Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net35 build in multi-targeted project does not build after migration #665

Closed
bradwilson opened this issue Jan 17, 2017 · 2 comments
Closed

Comments

@bradwilson
Copy link
Contributor

Preliminary steps:

Repro steps (command line):

  $ dotnet build
[...]
C:\Program Files\dotnet\sdk\1.0.0-rc3-004504\Microsoft.Common.CurrentVersion.targets(1110,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" 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:\Dev\xunit\xunit\src\xunit.runner.utility\xunit.runner.utility.csproj]
[...]

The machine has .NET 3.5 installed (this is migrated from a VS2015 solution that builds as-is).

Repro steps (Visual Studio 2017):

The behavior is broken in a different way from within Visual Studio. Build results:

[...]
2>------ Build started: Project: xunit.runner.utility, Configuration: Debug Any CPU ------
2>xunit.runner.utility -> C:\Dev\xunit\xunit\src\xunit.runner.utility\bin\Debug\net45\xunit.runner.utility.desktop.dll
2>xunit.runner.utility -> C:\Dev\xunit\xunit\src\xunit.runner.utility\bin\Debug\net35\xunit.runner.utility.dll
2>xunit.runner.utility -> C:\Dev\xunit\xunit\src\xunit.runner.utility\bin\Debug\netstandard1.1\xunit.runner.utility.dotnet.dll
2>AppDomain\AppDomainManager_AppDomain.cs(7,23,7,34): error CS0234: The type or namespace name 'Permissions' does not exist in the namespace 'System.Security' (are you missing an assembly reference?)
2>Configuration\ConfigReader_Configuration.cs(4,14,4,27): error CS0234: The type or namespace name 'Configuration' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>Utility\DiaSessionWrapper_DotNet.cs(9,11,9,28): error CS0101: The namespace 'Xunit' already contains a definition for 'DiaSessionWrapper'
2>Utility\DiaSessionWrapperHelper_DotNet.cs(11,11,11,34): error CS0101: The namespace 'Xunit' already contains a definition for 'DiaSessionWrapperHelper'
2>Frameworks\v1\IXunit1Executor.cs(5,14,5,17): error CS0234: The type or namespace name 'Web' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(5,14,5,17): error CS0234: The type or namespace name 'Web' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>Frameworks\v1\Xunit1Executor.cs(7,14,7,17): error CS0234: The type or namespace name 'Web' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>AppDomain\AppDomainManager_AppDomain.cs(31,16,31,25): error CS0246: The type or namespace name 'AppDomain' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeExtensions.cs(10,50,10,57): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>AppDomain\AppDomainManager_AppDomain.cs(37,16,37,25): error CS0246: The type or namespace name 'AppDomain' could not be found (are you missing a using directive or an assembly reference?)
2>Configuration\ConfigReader_Configuration.cs(54,33,54,64): error CS0246: The type or namespace name 'KeyValueConfigurationCollection' could not be found (are you missing a using directive or an assembly reference?)
2>Configuration\ConfigReader_Configuration.cs(68,40,68,71): error CS0246: The type or namespace name 'KeyValueConfigurationCollection' could not be found (are you missing a using directive or an assembly reference?)
2>Configuration\ConfigReader_Configuration.cs(79,28,79,59): error CS0246: The type or namespace name 'KeyValueConfigurationCollection' could not be found (are you missing a using directive or an assembly reference?)
2>Utility\LongLivedMarshalByRefObject.cs(9,64,9,82): error CS0234: The type or namespace name 'MarshalByRefObject' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>Frameworks\v1\Xunit1ExceptionUtility.cs(49,71,49,78): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\TestFrameworkOptions.cs(14,13,14,25): error CS0234: The type or namespace name 'SerializableAttribute' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>Frameworks\TestFrameworkOptions.cs(14,13,14,25): error CS0234: The type or namespace name 'Serializable' does not exist in the namespace 'System' (are you missing an assembly reference?)
2>Frameworks\v1\Xunit1Executor.cs(60,36,60,57): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\Xunit1Executor.cs(76,65,76,86): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\IXunit1Executor.cs(23,29,23,50): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\IXunit1Executor.cs(31,58,31,79): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(14,72,14,93): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(56,16,56,37): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(61,14,61,35): error CS0246: The type or namespace name 'ICallbackEventHandler' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\TestClassCallbackHandler.cs(52,22,52,29): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\TestClassCallbackHandler.cs(77,22,77,29): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\TestClassCallbackHandler.cs(85,21,85,28): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(48,39,48,46): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\TestClassCallbackHandler.cs(146,40,146,47): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\TestClassCallbackHandler.cs(17,47,17,54): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(36,16,36,23): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(56,16,56,37): error CS0538: 'ICallbackEventHandler' in explicit interface declaration is not an interface
2>Frameworks\v1\XmlNodeCallbackHandler.cs(61,14,61,35): error CS0538: 'ICallbackEventHandler' in explicit interface declaration is not an interface
2>Frameworks\v1\XmlNodeCallbackHandler.cs(16,28,16,35): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Frameworks\v1\XmlNodeCallbackHandler.cs(25,49,25,56): error CS0246: The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
2>Utility\AssemblyHelper.cs(67,41,67,57): error CS0246: The type or namespace name 'ResolveEventArgs' could not be found (are you missing a using directive or an assembly reference?)
2>Utility\LongLivedMarshalByRefObject.cs(13,39,13,64): error CS0115: 'LongLivedMarshalByRefObject.InitializeLifetimeService()': no suitable method found to override
2>C:\Dev\xunit\xunit\src\common\LongLivedMarshalByRefObject.cs(22,11,22,29): error CS0246: The type or namespace name 'MarshalByRefObject' could not be found (are you missing a using directive or an assembly reference?)
2>C:\Dev\xunit\xunit\src\common\LongLivedMarshalByRefObject.cs(57,39,57,64): error CS0115: 'LongLivedMarshalByRefObject.InitializeLifetimeService()': no suitable method found to override
2>Utility\DiaSessionWrapper_DotNet.cs(14,16,14,33): error CS0111: Type 'DiaSessionWrapper' already defines a member called '.ctor' with the same parameter types
2>Utility\DiaSessionWrapper_DotNet.cs(21,34,21,51): error CS0111: Type 'DiaSessionWrapper' already defines a member called 'GetNavigationData' with the same parameter types
2>Utility\DiaSessionWrapper_DotNet.cs(28,21,28,28): error CS0111: Type 'DiaSessionWrapper' already defines a member called 'Dispose' with the same parameter types
2>Configuration\ConfigReader_Configuration.cs(91,30,91,61): error CS0246: The type or namespace name 'KeyValueConfigurationCollection' could not be found (are you missing a using directive or an assembly reference?)
2>C:\Dev\xunit\xunit\src\common\XunitWorkerThread.cs(68,18,68,24): error CS0246: The type or namespace name 'Thread' could not be found (are you missing a using directive or an assembly reference?)
2>Utility\DiaSessionWrapperHelper_DotNet.cs(16,16,16,39): error CS0111: Type 'DiaSessionWrapperHelper' already defines a member called '.ctor' with the same parameter types
2>Utility\DiaSessionWrapperHelper_DotNet.cs(47,21,47,30): error CS0111: Type 'DiaSessionWrapperHelper' already defines a member called 'Normalize' with the same parameter types
2>Done building project "xunit.runner.utility.csproj" -- FAILED.
[...]

Environment:

  $ dotnet --info
.NET Command Line Tools (1.0.0-rc3-004504)

Product Information:
 Version:            1.0.0-rc3-004504
 Commit SHA-1 hash:  b312fbb176

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0-rc3-004504
@nguerrera
Copy link
Contributor

For dotnet build, this is dotnet/msbuild#1333 as CLI uses core msbuild.

I will investigate why it also fails using VS / desktop msbuild with different behavior.

@dsplaisted
Copy link
Member

Building from VS or from full framework MSBuild is fixed. .NET Core MSBuild (ie via the dotnet command) is tracked by dotnet/msbuild#1333.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants