The specified metadata path is not valid
I have the same problem in WinForms/VS2008/Win7
Hi,
I have the same problem ('Unable to load the specified metadata resource').
2 days ago I migrated from Vista to Win7 and now I can build my projects, but after runing I get error 'Unable to load the specified metadata resource'.
...and I discovered an mystery (the same project):
In Vista:
..\bin\Debug\EMIS2DatabaseM2.dll (size 423 424)
..\bin\Debug\EMIS2DatabaseM2.pdb (size 499 200)
In W7:
..\bin\Debug\EMIS2DatabaseM2.dll (size 170 496)
..\bin\Debug\EMIS2DatabaseM2.pdb (size 495 104)
I think, under W7 in library something missing...
PaRi
I have the same problem ('Unable to load the specified metadata resource').
2 days ago I migrated from Vista to Win7 and now I can build my projects, but after runing I get error 'Unable to load the specified metadata resource'.
...and I discovered an mystery (the same project):
In Vista:
..\bin\Debug\EMIS2DatabaseM2.dll (size 423 424)
..\bin\Debug\EMIS2DatabaseM2.pdb (size 499 200)
In W7:
..\bin\Debug\EMIS2DatabaseM2.dll (size 170 496)
..\bin\Debug\EMIS2DatabaseM2.pdb (size 495 104)
I think, under W7 in library something missing...
PaRi
Could you please check that your %Windows%\Microsoft.NET\Framework\v3.5 folder contains both Devart.Data.Entity.Build.Tasks.dll and Devart.Data.Entity.targets?
Also please check that the %Windows%\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets file contains the
line.
Also please check that the %Windows%\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets file contains the
Code: Select all
Is there a solution to this? I have the exact same problem.
Under Vista I dont get errors under WIn7 the compiled DLL is smaller and I get an MetaDataException...
I checked the frameworkfolder: both files are present, however the Import conditons where missing. I added them manually, but still get the same result....
Under Vista I dont get errors under WIn7 the compiled DLL is smaller and I get an MetaDataException...
I checked the frameworkfolder: both files are present, however the Import conditons where missing. I added them manually, but still get the same result....
I have similar problem with an ASP.NET MVC project and an assembly containing my model.
In VS2008, everything runs fine, using the integrated webserver.
But after creating a deployement project, generating an msi file, and install it on an test server with IIS 6.0, I get a System.Data.MetadataException when I try the web site.
My entity connection is created like this :
and it is used to create the entity container.
I'm using the last version of entity developer (2.20.43) and of dotConnect for Oracle (5.25.49.0)
The setup package that I built must be deployed to customers in first half of november, and I'm running out of ideas to make it works.
In VS2008, everything runs fine, using the integrated webserver.
But after creating a deployement project, generating an msi file, and install it on an test server with IIS 6.0, I get a System.Data.MetadataException when I try the web site.
My entity connection is created like this :
Code: Select all
public static EntityConnection CreateConnection(string server, string user, string password)
{
string metadata = "metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=Devart.Data.Oracle;provider connection string=\"Server={0};User Id={1};Password={2};Persist Security Info=True\"";
string connectionString = String.Format(metadata, server, user, password);
return new EntityConnection(connectionString);
}
I'm using the last version of entity developer (2.20.43) and of dotConnect for Oracle (5.25.49.0)
The setup package that I built must be deployed to customers in first half of november, and I'm running out of ideas to make it works.
I answer to myself.
I found the problem.
In fact, my model files were in a subdirectory of the assembly project.
I notice that, in app.config, the connection string contains the metadata resource string. I used it to build my connection string and it works fine.
The model files must be prefixed with the subdirectory name as :
If this can help someone else who makes the same mistake than me.
I found the problem.
In fact, my model files were in a subdirectory of the assembly project.
I notice that, in app.config, the connection string contains the metadata resource string. I used it to build my connection string and it works fine.
The model files must be prefixed with the subdirectory name as :
Code: Select all
res://*/Models.MyModel.csdl|res://*/Models.MyModel.ssdl|res://*/Models.MyModel.msl
*Edit: I copied the file from a backup and modified the Microsoft.Common.targets manually and now it works again. You might want to check your setup routine.
I just installed the 2.50.50 release under Vista 64 bit and this error came back. I checked the files and "Devart.Data.Entity.Build.Tasks.dll" is there, but "Devart.Data.Entity.targets" is missing (in both Framwork\3.5\ and Framework64\3.5\). Aso, there is no entry in the Microsoft.Common.targets file.
Any advice? I am currently under a deadline, so a fast response would be highly appreciated.
kind regards
I just installed the 2.50.50 release under Vista 64 bit and this error came back. I checked the files and "Devart.Data.Entity.Build.Tasks.dll" is there, but "Devart.Data.Entity.targets" is missing (in both Framwork\3.5\ and Framework64\3.5\). Aso, there is no entry in the Microsoft.Common.targets file.
Any advice? I am currently under a deadline, so a fast response would be highly appreciated.
kind regards
AndreyR wrote:Could you please check that your %Windows%\Microsoft.NET\Framework\v3.5 folder contains both Devart.Data.Entity.Build.Tasks.dll and Devart.Data.Entity.targets?
Also please check that the %Windows%\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets file contains theline.Code: Select all
The file exists and it was put there by Postsharp 1.5.AndreyR wrote:Could you please check %Program Files\MSBuild\3.5\Custom.After.Microsoft.Common.targets% for DevartEntityDeploy?
If this file existed before dotConnect is installed, then the problem could occur. We are working on it.
Code: Select all
I'm running Vista 7 x64 and Visual Studio 2010 Beta 2 and both the build steps and the Devart build DLLs are missing from the 32-bit or 64-bit "v4.0" framework folder.
So I'm also getting a "Unable to load the specified metadata resource." and if I ask the metadata file to be put in the output folder, nothing is generated.
Edit:
If have updated my %Program Files (x86)%\MSBuild\v4.0\Custom.After.Microsoft.Common.targets file to contain what's in %Program Files (x86)%\MSBuild\Devart\v4.0\Devart.Data.Entity.targets and still I'm not generating metadata ressource files.
So I'm also getting a "Unable to load the specified metadata resource." and if I ask the metadata file to be put in the output folder, nothing is generated.
Edit:
If have updated my %Program Files (x86)%\MSBuild\v4.0\Custom.After.Microsoft.Common.targets file to contain what's in %Program Files (x86)%\MSBuild\Devart\v4.0\Devart.Data.Entity.targets and still I'm not generating metadata ressource files.
-
- Posts: 3
- Joined: Fri 05 Feb 2010 14:35
- Location: Knoxville, TN
Re: Unable to load metadata resource error
Using the following configuration:
Windows 7 x64 Enterprise Edition
Visual Studio 2010 RC (Not beta 2...)
dotConnect beta (5.55.90 I think is the correct version number - latest build)
Attempting to create a new console application, add a new Devart Model to the project, drop on one table from the database on to the model.
Any EF query generates the following error:
"Unable to load the specified metadata resource."
Have tried:
All of the above with respect to adding the Devart.Data.Entity.targets files to both v3.5 and v4.0 framework directories.
Ensured that the Custom.After......targets file that exists was created in the MSBuild\Devart\v4.0 custom build task directory and included the expected import node.
Attempted to add the import statement to the Microsoft.Common.targets file in the v3.5 and v4.0 directory with only success in the v3.5 directory as I could never get permission to the v4.0 file to make the appropriate changes (Trusted Installer is the only user with permissions to modify this file).
Have attempted to open the model for editing and change the model level property to include in output directory instead of embed as resource, then clean, rebuild and set the property back to embed as resource with no luck. Also, when setting this property to include in output directory, none of the .*sdl files are generated or written to any output directory.
I have also examined the sizes of the .dll output as the original poster in this thread indicated and did notice a significant difference under VS2010 where the dll is smaller (by approximately the size of the respective resources that should be embedded in the dll and do not appear to be).
You have noted that there was a fix for this with a previous release and it appears that it may have resurfaced after a couple of releases, so I am curious what my next steps need to be. Can you describe the details of the fix or do you have any recommendations for running successfully under v4.0 VS2010 RC?
Windows 7 x64 Enterprise Edition
Visual Studio 2010 RC (Not beta 2...)
dotConnect beta (5.55.90 I think is the correct version number - latest build)
Attempting to create a new console application, add a new Devart Model to the project, drop on one table from the database on to the model.
Any EF query generates the following error:
"Unable to load the specified metadata resource."
Have tried:
All of the above with respect to adding the Devart.Data.Entity.targets files to both v3.5 and v4.0 framework directories.
Ensured that the Custom.After......targets file that exists was created in the MSBuild\Devart\v4.0 custom build task directory and included the expected import node.
Attempted to add the import statement to the Microsoft.Common.targets file in the v3.5 and v4.0 directory with only success in the v3.5 directory as I could never get permission to the v4.0 file to make the appropriate changes (Trusted Installer is the only user with permissions to modify this file).
Have attempted to open the model for editing and change the model level property to include in output directory instead of embed as resource, then clean, rebuild and set the property back to embed as resource with no luck. Also, when setting this property to include in output directory, none of the .*sdl files are generated or written to any output directory.
I have also examined the sizes of the .dll output as the original poster in this thread indicated and did notice a significant difference under VS2010 where the dll is smaller (by approximately the size of the respective resources that should be embedded in the dll and do not appear to be).
You have noted that there was a fix for this with a previous release and it appears that it may have resurfaced after a couple of releases, so I am curious what my next steps need to be. Can you describe the details of the fix or do you have any recommendations for running successfully under v4.0 VS2010 RC?