Saturday 15 September 2012

visual studio 2008 - .Net multitargeting gone wrong? -


V.S. In 2008 I have a small dummy project, which only has the following code file

   

using the system; Namespace Frameworktist {Internal Fixed Class MessageCenture {Structure Test Structure} {Public Input Estates; } Public static zero main () {Test Structure pMgmtProps = New Test Structure {aStatus = IntPtr.Zero}; }}}

This project has been set to target Framework 2.0, even manually set up Toolwarson 2.0. Now this project is just doing fine from VS and fails (by using csc.exe 2.0) from the command line.

C: \ wINDOWS \ Microsoft.NET \ framework \ v2.0.50727 \ csc.exe / noconfig / Nowarn: 1701,1702 / errorReport: signal / warning: 4 / define: DEBUG; TRACE /reference:C::WINDOWS\Microsoft.NET\Framework.v2.0.50727.aspy.data.dll/Reg: C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ System.dll / reference: C: \ WINDOWS \ Microsoft.NET.Framework \ v2.0.50727 \ System.Xml.dll / debug + / debug: full / file-side: 512 / customization- / out: obj \ Debug \ FrameworkTest.exe / target: exe Class1.cs Properties \ assemblyInfo.cs

The question now is why does it compile from VS? In the case of the compilation of the CMD line, this should fail. The same source failed in the VS-2005 project (correct).

Multi-targeting means CLR --Version-targeting, C # -Display-Targeting


No comments:

Post a Comment