64-bit win7+vs2010 compilation. net3.5 Previous version issue

Source: Internet
Author: User
Tags visual studio 2010

General compilation will appear

1. "ResGen.exe" has exited with code 2 problem handling

2. "Error 2" LC.exe "has exited, code is-1. Nbgis. Maingis "

3. " failed to load file or assembly" ESRI. Arcgis.carto, version=10.0.0.0, Culture=neutral, publickeytoken=8fc3cc631 "

The first problem with the. net3.5 platform is that because 64 calls ResGen.exe during compilation, resulting in compilation errors, the workaround is in two ways:

1. Close Visual Studio.

2. In the Visual Studio Tools directory, run Visual Studio Command Prompt (2010) as an administrator,

[Note: This is in the beginning-All Programs--microsoft Visual Studio 2010]

Switch directories to ": \program Files (x86) \microsoft Sdks\windows\v\bin\". (Mine is v7.0a)

[Note: Switch directories with the CD command]

3. Execute the command:
corflags/32bit+ Resgen.exe/force

4. Open the. csproj file in Notepad

5. Add <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture> This property is below PropertyGroup: Then save the file.

Try compiling again, everything ok!

Or, open the. csproj file in Notepad and add the following code:

<!--workaround for VS2010. NET 3.5 Application referencing x86 assembly in ResX file on 64-bit OS http://social.msdn.m ICROSOFT.COM/FORUMS/EN-US/MSBUILD/THREAD/E5900710-9849-4D10-AA28-48B734D06BF2-<PropertyGroup> < Forceresgen32bit condition= "' $ (msbuildtoolsversion) ' = = ' 4.0 ' and ' $ (processor_architew6432) '! = ' and ' $ ( targetingclr2framework) ' = = ' true ' and ' $ (platformtarget) ' = = ' x86 ' ">true</ForceResGen32Bit> </ propertygroup> <target name= "Beforeresgen" condition= "' $ (forceresgen32bit) ' = = ' true ' > <propertygroup > <resgensdktoolspath>$ (intermediateoutputpath) resgenforced32bit\</resgensdktoolspath> </ propertygroup> <!--Copy Resgen.exe to intermediate working directory for UAC Settings--<copy sourcefiles= " $ (targetframeworksdktoolsdirectory) ResGen.exe "destinationfiles=" $ (resgensdktoolspath) ResGen.exe "/> <!-- Corflags.exe resgen.exe/32bit+/force--> <exec workingdirectory= "$ (resgensdktoolspath)" command= "" $(targetframeworksdktoolsdirectory) Corflags.exe "resgen.exe/32bit+/force"/> <!--generateresource Task Parameters Using the Non-64bit Tracker.exe and indicate Resgen.exe have been forced to x86-<PropertyGroup> &lt ; resgentrackersdkpath>$ (Sdk40toolspath) </ResGenTrackerSdkPath> <ResGenToolArchitecture> Managed32bit</resgentoolarchitecture> <cachetargetframeworksdktoolsdirectory>$ ( Targetframeworksdktoolsdirectory) </CacheTargetFrameworkSDKToolsDirectory> < targetframeworksdktoolsdirectory>$ (Resgensdktoolspath) </TargetFrameworkSDKToolsDirectory> </ propertygroup> </Target> <target name= "Afterresgen" condition= "' $ (forceresgen32bit) ' = = ' true '" > < Propertygroup> <targetframeworksdktoolsdirectory>$ (cachetargetframeworksdktoolsdirectory) </ targetframeworksdktoolsdirectory> </PropertyGroup> <removedir directories= "$ (Resgensdktoolspath)" condition= "Exists (' $ (resgensdktoolspath) ')"/> </taRget>  

Reload.

And for earlier things like the. net2.0 platform, you should continue

1. In the Solution Explorer window, right-click the project = = Property
2. In the properties page that pops up, select the Build tab
3, modify the "Build" tab inside the "Target platform" is: "X86"
4. Recompile the program OK

If you apply a three-party control, you may also see a third error, the solution is as follows:

1, the project folder under the Properties folder under the Licenses.licx file deletion, recompile can be;

2. Open the *.csproj file in text mode, find the Licenses.licx word in the file, delete the corresponding node.

Note: There is another situation is that the Properties folder has no Licenses.licx file, the program or report this error, this time you just need to rename an empty TXT file for licenses.licx and put into the Properties folder, the problem can also be resolved.

At this point, the general project migration can be done.

If you are doing a AE9.2 project migration 10.0, you may

Unable to find ESRI.ArcGIS.Utility; The reference solution is as follows:

ESRI.ArcGIS.Utility, ESRI is not found in the ARCGIS10 environment. ArcGIS.Utility.BaseClasses and other references, ArcGIS9.2 after the Utility will gradually be discarded, instead of using the ADF, Change ESRI.ArcGIS.Utility and ESRI.ArcGIS.Utility.BaseClasses to ESRI.ArcGIS.ADF, ESRI. ArcGIS.ADF.BaseClasses problem solving.

Note: Because baseclasses exists in ESRI.ArcGIS.ADF and ESRI.ArcGIS.ADF.local, because the ESRI.ArcGIS.ADF.local reference is being deleted.

64-bit win7+vs2010 compilation. net3.5 Previous version issue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.