开发者

VS 2010 (and publicize.exe) create xxx_accessor.exe instead of .dll

开发者 https://www.devze.com 2023-04-01 18:28 出处:网络
I\'m having a strange problem with private accessors and VS201开发者_开发问答0. Normally, VS and publicize.exe create a xyz_accessor.dll and xyz_accessor.pdb. Unitl yesterday, my VS also did this. But

I'm having a strange problem with private accessors and VS201开发者_开发问答0. Normally, VS and publicize.exe create a xyz_accessor.dll and xyz_accessor.pdb. Unitl yesterday, my VS also did this. But then I built the solution via the command line, using the VS2010 c# compiler, so nothing else than VS would normally do. The solution built without any errors, but instead of getting the xyz_accessor.dll I got an xyz_accessor.exe. When trying to execute it, windows tells me it wouldn't be a valid win32 application. I tried to build the tests also with publicize.exe, but its the same. The strange thing about it is, that VS is able to run all the tests, but with mstest.exe all tests fail because of the xyz_accessor.dll is not found, which is linked in the Unittest.dll compiled from the test project.

Does anybody know how to solve this behaviour?

Regards, Christian


Use MSBuild on your solution instead of CSC and it should build correctly (not sure about publicize though)


I used msbuild on the solution. But it looks like I was wrong with saying VS2010 compiles an accessor.dll. This Project was created with vs2005 and the unit tests are from vs 2008. Now with the migration to 2010, it seems that there is a .exe generated instead of a .dll (at my workstation, at least). I actually used an old version of mstest (.net 3.5)without knowing and tried it again with the new version after setting all project target frameworks to 4.0. Now it works as it should. the only strange thing left is that the new acessor exe is always writtten in small letters and not like the project it's corresponding to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号