You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Erin Rollenhagen <er...@entrepreneurialtechnologies.com> on 2008/12/11 22:25:27 UTC

Error: Unable to load file via resource "SqlMap.config" as resource.

Hello All!

 

After many successful website deployments using Ibatis, I am for the first
time trying to deploy a Windows Application using Ibatis.  (VB.NET using
Visual Studio 2005)

 

I'm sure that this is a very simple problem, but I seem to be really stuck.
I can't seem to get the SqlMap.config and providers.config files to be
installed in the correct place for the application to find them at runtime.
My initial attempt was to, as the documentation suggested, put them in the
bin/Debug folder.  This works fine on my development machine but fails with
the "Error: Unable to load file via resource "SqlMap.config" as resource. "
message when I install it on a client machine.  So far, I've been unable to
figure out how to tell Visual Studio to include these files in the correct
location to make them work once installed.

 

I also tried manually copying the sqlmap.config and providers.config files
to the bin/Debug folder within the publish folder before running setup.exe,
but to no avail.

 

Has anyone successfully deployed a windows application to client machines
this  way?

 

Thanks!

 

--Erin 

 


RE: Error: Unable to load file via resource "SqlMap.config" as resource.

Posted by Erin Rollenhagen <er...@entrepreneurialtechnologies.com>.
It now works smoothly.   Thank you, Nicholas, for your help!

 

In case anyone else has a similar problem, here is what finally fixed the
last issue, the SqlMap files themselves not being found at runtime: I had
the SqlMaps files in a folder called "SqlMaps" and was referencing them as
such in the SqlMap.config file.  It seemed to me that the ClickOnce
deployment tool did not create this SqlMaps folder in the installation
directory, which seemed to be causing the problem.  When I moved the map
files outside of the folder, and made sure they were set to "Include" on the
Application Files page in the Publish wizard and then set the Build Action
to "Content" and the Copy to Output Directory to "Copy if newer" as you
suggested for the config files, it works correctly as installed.

 

Thank you again for your help, especially since my problems really had more
to do with unfamiliarity with the Windows App. side of VS2005 than SqlMaps.


 

From: Erin Rollenhagen [mailto:erin@entrepreneurialtechnologies.com] 
Sent: Friday, December 12, 2008 7:56 AM
To: user-cs@ibatis.apache.org
Subject: RE: Error: Unable to load file via resource "SqlMap.config" as
resource.

 

Thank you!  I was able to get it working by doing that, although it still
copies my Sql Map files to the wrong place and I have to manually move them
but hopefully I will get that figured out here this morning.  All symptoms
of my lack of familiarity with windows applications, I'm sure.  Again, thank
you!

 

 

From: Nicholas L. Piasecki [mailto:nicholas@piasecki.name] 
Sent: Thursday, December 11, 2008 4:27 PM
To: user-cs@ibatis.apache.org
Subject: RE: Error: Unable to load file via resource "SqlMap.config" as
resource.

 

Under the Project menu, choose Show All Files and include your config files
in your project. Click on one of the files in Solution Explorer and in the
Properties pane, change Copy to Output Directory from "Do not copy" to "Copy
if newer". 

 

If it's a ClickOnce deployment (and it sounds like it is), also change the
Build Action from "None" to "Content"-otherwise, mage won't automatically
pick it up.

 

Hope that helps.

 

V/R,

Nicholas Piasecki

 

From: Erin Rollenhagen [mailto:erin@entrepreneurialtechnologies.com] 
Sent: Thursday, December 11, 2008 4:25 PM
To: user-cs@ibatis.apache.org
Subject: Error: Unable to load file via resource "SqlMap.config" as
resource. 

 

Hello All!

 

After many successful website deployments using Ibatis, I am for the first
time trying to deploy a Windows Application using Ibatis.  (VB.NET using
Visual Studio 2005)

 

I'm sure that this is a very simple problem, but I seem to be really stuck.
I can't seem to get the SqlMap.config and providers.config files to be
installed in the correct place for the application to find them at runtime.
My initial attempt was to, as the documentation suggested, put them in the
bin/Debug folder.  This works fine on my development machine but fails with
the "Error: Unable to load file via resource "SqlMap.config" as resource. "
message when I install it on a client machine.  So far, I've been unable to
figure out how to tell Visual Studio to include these files in the correct
location to make them work once installed.

 

I also tried manually copying the sqlmap.config and providers.config files
to the bin/Debug folder within the publish folder before running setup.exe,
but to no avail.

 

Has anyone successfully deployed a windows application to client machines
this  way?

 

Thanks!

 

--Erin 

 


RE: Error: Unable to load file via resource "SqlMap.config" as resource.

Posted by Erin Rollenhagen <er...@entrepreneurialtechnologies.com>.
Thank you!  I was able to get it working by doing that, although it still
copies my Sql Map files to the wrong place and I have to manually move them
but hopefully I will get that figured out here this morning.  All symptoms
of my lack of familiarity with windows applications, I'm sure.  Again, thank
you!

 

 

From: Nicholas L. Piasecki [mailto:nicholas@piasecki.name] 
Sent: Thursday, December 11, 2008 4:27 PM
To: user-cs@ibatis.apache.org
Subject: RE: Error: Unable to load file via resource "SqlMap.config" as
resource.

 

Under the Project menu, choose Show All Files and include your config files
in your project. Click on one of the files in Solution Explorer and in the
Properties pane, change Copy to Output Directory from "Do not copy" to "Copy
if newer". 

 

If it's a ClickOnce deployment (and it sounds like it is), also change the
Build Action from "None" to "Content"-otherwise, mage won't automatically
pick it up.

 

Hope that helps.

 

V/R,

Nicholas Piasecki

 

From: Erin Rollenhagen [mailto:erin@entrepreneurialtechnologies.com] 
Sent: Thursday, December 11, 2008 4:25 PM
To: user-cs@ibatis.apache.org
Subject: Error: Unable to load file via resource "SqlMap.config" as
resource. 

 

Hello All!

 

After many successful website deployments using Ibatis, I am for the first
time trying to deploy a Windows Application using Ibatis.  (VB.NET using
Visual Studio 2005)

 

I'm sure that this is a very simple problem, but I seem to be really stuck.
I can't seem to get the SqlMap.config and providers.config files to be
installed in the correct place for the application to find them at runtime.
My initial attempt was to, as the documentation suggested, put them in the
bin/Debug folder.  This works fine on my development machine but fails with
the "Error: Unable to load file via resource "SqlMap.config" as resource. "
message when I install it on a client machine.  So far, I've been unable to
figure out how to tell Visual Studio to include these files in the correct
location to make them work once installed.

 

I also tried manually copying the sqlmap.config and providers.config files
to the bin/Debug folder within the publish folder before running setup.exe,
but to no avail.

 

Has anyone successfully deployed a windows application to client machines
this  way?

 

Thanks!

 

--Erin 

 


RE: Error: Unable to load file via resource "SqlMap.config" as resource.

Posted by "Nicholas L. Piasecki" <ni...@piasecki.name>.
Under the Project menu, choose Show All Files and include your config files
in your project. Click on one of the files in Solution Explorer and in the
Properties pane, change Copy to Output Directory from "Do not copy" to "Copy
if newer". 

 

If it's a ClickOnce deployment (and it sounds like it is), also change the
Build Action from "None" to "Content"-otherwise, mage won't automatically
pick it up.

 

Hope that helps.

 

V/R,

Nicholas Piasecki

 

From: Erin Rollenhagen [mailto:erin@entrepreneurialtechnologies.com] 
Sent: Thursday, December 11, 2008 4:25 PM
To: user-cs@ibatis.apache.org
Subject: Error: Unable to load file via resource "SqlMap.config" as
resource. 

 

Hello All!

 

After many successful website deployments using Ibatis, I am for the first
time trying to deploy a Windows Application using Ibatis.  (VB.NET using
Visual Studio 2005)

 

I'm sure that this is a very simple problem, but I seem to be really stuck.
I can't seem to get the SqlMap.config and providers.config files to be
installed in the correct place for the application to find them at runtime.
My initial attempt was to, as the documentation suggested, put them in the
bin/Debug folder.  This works fine on my development machine but fails with
the "Error: Unable to load file via resource "SqlMap.config" as resource. "
message when I install it on a client machine.  So far, I've been unable to
figure out how to tell Visual Studio to include these files in the correct
location to make them work once installed.

 

I also tried manually copying the sqlmap.config and providers.config files
to the bin/Debug folder within the publish folder before running setup.exe,
but to no avail.

 

Has anyone successfully deployed a windows application to client machines
this  way?

 

Thanks!

 

--Erin