none
Why it keep giving 3 warning when building a project on windows server 2012, while no warning in my local machine? RRS feed

  • Question

  • Hi guys,

    Currently, I faced a weird problem.  I create a simple C# console sample, and build on my local PC, everything is fine, no error, no warning. However, when I build it on my server(windows server 2012), it gives me 3 warnings. In both way, I use "msbuild  E:\Hudson\workspace\Sample1\Sample1.sln" to build the project...

    How can I get rid of these warnings, any suggestion? Thanks in advance.

    Detail info of Warning:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(983,5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

    My local PC:

    With VS2010 and VS 2012 installed.

    Configured the Environment Variables:FRAMEWORK_HOME = C:\Windows\Microsoft.NET\Framework64\v4.0.30319

    Windows Server 2012:

    Just configure the Environment Variables:FRAMEWORK_HOME = C:\Windows\Microsoft.NET\Framework64\v4.0.30319


    Lisa Zhu [MSFT]

    Wednesday, June 18, 2014 9:25 AM

Answers

  • Hi Again,
    After a lot of search and test work, I finally solved this problem.
    Scenario:
    It turns out that, on Server 2012, there is no reference Assemblies V4.0  under C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework.
    There is only V4.5, that's why, it keeps warning me "The reference assemblies for framework ".NETFramework,Version=v4.0" were not found."
    Solution:
    Just copy this folder from my local PC to that server, rebuild the project and those warnings are gone.


    Thanks.


    Lisa Zhu [MSFT]

    • Marked as answer by Lisa Zhu Thursday, June 19, 2014 3:49 AM
    Thursday, June 19, 2014 3:49 AM

All replies

  • Hi Again,
    After a lot of search and test work, I finally solved this problem.
    Scenario:
    It turns out that, on Server 2012, there is no reference Assemblies V4.0  under C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework.
    There is only V4.5, that's why, it keeps warning me "The reference assemblies for framework ".NETFramework,Version=v4.0" were not found."
    Solution:
    Just copy this folder from my local PC to that server, rebuild the project and those warnings are gone.


    Thanks.


    Lisa Zhu [MSFT]

    • Marked as answer by Lisa Zhu Thursday, June 19, 2014 3:49 AM
    Thursday, June 19, 2014 3:49 AM
  • Hi Lisa,

    Thank you for sharing your solutions here. It will be very beneficial for other community members who have similar questions.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 19, 2014 5:19 AM