when I add this file (cvextern.dll) to reference or I use the command csc from cmd .. I get this error
fatal error CS0009: Metadata file "file_path" could not be opened -- 'An attempt was made to load a program with an incorrect format. '
why is that happen? How can I solve it?
thank you all
The comment by Hans Passant is correct. The file cvextern.dll when using EMGU should either be copied into your output folder where your program is running or added to your project as an existing item. Then select the item in solution explorer and change its properties in the properties panel "Copy to Output Directory" to CopyAlways. See http://www.emgu.com/wiki/index.php/Download_And_Installation for more information on proper use of the files.
Cheers
Chris
Related
I wanted to publish my project with "PreCompile During Publish" option checked but I get this error:
Copying file VERYLONGDIRECTORY\P.aspx to obj\Release\AspnetCompileMerge\Source\VERYLONGDIRECTORY\P.aspx failed. Could not find a part of the path 'obj\Release\AspnetCompileMerge\Source\VERYLONGDIRECTORY\P.aspx'.
I deleted the file from the project and the publish succeeded. Then, re-added the ASPX file to the project and the error is popping up again. I excluded it from the project and it works. I need the ASPX file to be in my project, this is a bit weird...
What should I do?
Try put the following in your publish profile (.pubxml)
<aspnetcompilemergeintermediateoutputpath>c:\temp</aspnetcompilemergeintermediateoutputpath>
This will change the temporary path where the project is built.
Windows has a max length of 260 characters for file path.
Please tell me that the above exception was copied and pasted for this question?
Because, I could find a Typo in the exception which is given below:
Copying file VERYLONGDIRECTORY\P.aspx to obj\Release\AspnetCompileMerge\Source\VERYLONGDIRECTORY\P.aspx.aspx failed ,this line ends with dual P.aspx.aspx extension. This typo would be a reason if not then do check some links below.
I have provided some links related to your exception, If you have not already visited, then do check their are multiple solutions and you could find one.
IntelliSense keeps giving [Failure] Could not find a part of the path C:\TEMP
ASP.NET publish trying to copy a non-existant file
I changed the Output path for some projects of my Solution and now I´m getting some errors when I Build my solution. Errors like:
Could not copy the file "MyProject....pdb" because it was not found...
How could I fix it?
(1) Please Uncheck the option "Enable the Visual Studio hosting process" from the project property->debug tab and see if that solves your issue.
(2) Please check your previous output and current output path, whether you can get the pdb file in the two folders? I suggest you delete the previous output path like bin/debug or release, and then re-open the project file, clean and rebuild the solution with the new output path, check it again.
(3) I also met this kind of issue which was related to the post-build event, so you need to check it in your side.
(4) Of course, if it is the reference between different projects, please make sure that you add the correct path for this reference and set the "copy local=true" after you change the output path.
I'm programming in c#, trying to read text from a file to create a map for a game that I'm making, but for some reason I keep getting the following error:
Could not find a part of the path
'F:\TiledLevel01\TiledLevel01\bin\x86\Debug\Content\Map.txt'.
Can anyone tell me where I may be going wrong? Thanks in advance!
Presumably that file exists in your project, so highlight the file in Solution Explorer, hit F4, and set its Build Action to Content. That will copy the file to the output folder on build.
I'm getting an error that reads:
The custom tool 'PublicResXFileCodeGenerator' failed while processing the file 'Properties\Resources.resx'
I haven't the slightest clue how to fix it.
If any of you know what's going on here, I could use your help.
Whenever a .resx file is compiled, Visual Studio runs it through the PublicResXFileCodeGenerator (or InternalResXFileCodeGenerator, if it's visibility is internal) to generate the actual strongly-typed properties that you use in your code.
If there is something wrong with the XML in the file, malformed or corrupted perhaps, then the process might fail. Can you open the file in the resource view?
Follow these instructions:
Copy the contents of Resources.resx to a new resource file.
Delete Resources.resx from the project.
Unload the project
Reload the project.
That should get rid of the compiler warning.
try this ..
Open your fileName.resx file in windows explorer and right click - Properties
maybe you will find "This file came from another computer and might be blocked to help protect this computer."
Check [Unblock] checkbox and apply then try to build your solution again.
The item "obj\Debug.resources" was specified more than once in the "Resources" parameter + c#.net
Did you by any chance copy/paste a Form?
the error tells you there is more then 1 class in the project with the same name.
For the others: the problem is reproducable using the following steps:
create a new smart device project.
copy/paste Form1. (so Visual Studio creates the files "Copy of Form1.*)
Build.
sure you don't have any duplicates?
If you don't have anything relevant in your resx files just delete them. VS will regenerate them and your project will compile. Do this only for the forms that you copy-pasted.
VS 2005?
See this: http://social.msdn.microsoft.com/forums/en-US/vbide/thread/4048e49f-3a6f-46ce-9efd-d046f7041e2e/
In your project file, if you open it in notepad, it will likely have the item listed twice. You can edit the project file or delete the resource file. If that doesn't help, also check the properties for your files, and make sure that they are correct, and have "Build Action" set to "Embedded Resource", "Copy to Output Directory" set to "Do not copy" for your resx files.
Try to clean up the project and then rebuild it again.