sdk: Runtime-specific build fails for projects with P2P references
[ Moved from dotnet/cli#4992 ]
Steps to reproduce
test_app.zip in test_app\App:
dotnet restoredotnet build -r win10-x64
Expected behavior
build succeeds
Actual behavior
build fails with output:
C:\Users\svbomer\AppData\Local\Temp\.NETStandard,Version=v1.4.AssemblyAttributes.cs(4,20): error CS0400: The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(6,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(7,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(8,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(9,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(10,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(11,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(12,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(13,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(14,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
C:\Users\svbomer\AppData\Local\Temp\.NETStandard,Version=v1.4.AssemblyAttributes.cs(4,71): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
C:\Users\svbomer\AppData\Local\Temp\.NETStandard,Version=v1.4.AssemblyAttributes.cs(4,100): error CS0246: The type or namespace name 'FrameworkDisplayName' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
C:\Users\svbomer\AppData\Local\Temp\.NETStandard,Version=v1.4.AssemblyAttributes.cs(4,123): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(6,55): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(7,61): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(8,59): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(9,59): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(10,68): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(11,55): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(12,53): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(13,55): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(14,63): error CS0518: Predefined type 'System.String' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(1,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
C:\Users\svbomer\AppData\Local\Temp\.NETStandard,Version=v1.4.AssemblyAttributes.cs(2,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
C:\Users\svbomer\AppData\Local\Temp\.NETStandard,Version=v1.4.AssemblyAttributes.cs(3,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(3,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
obj\Debug\netstandard1.4\Library.AssemblyInfo.cs(4,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(30,7): error CS0518: Predefined type 'System.Object' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(3,14): error CS0518: Predefined type 'System.Object' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(19,12): error CS0518: Predefined type 'System.Int32' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(24,24): error CS0518: Predefined type 'System.Int32' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(24,12): error CS0518: Predefined type 'System.Void' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]Library.cs(5,13): error CS0518: Predefined type 'System.Int32' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]Library.cs(6,13): error CS0518: Predefined type 'System.Int32' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]Library.cs(8,5): error CS0518: Predefined type 'System.Void' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(14,20): error CS0518: Predefined type 'System.Int32' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
Library.cs(14,5): error CS0518: Predefined type 'System.Void' is not defined or imported [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj] D:\cli\artifacts\win10-x64\stage2\sdk\1.0.0-preview5-004233\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(82,5): error : Assets file 'C:\Users\svbomer\active\projects\managed_linker\test_app\Library\obj\project.assets.json' doesn't have a target for '.NETStandard,Version=v1.4/win10-x64'. Ensure you have restored this project for TargetFramework='netstandard1.4' and RuntimeIdentifier='win10-x64'. [C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj]
D:\cli\artifacts\win10-x64\stage2\sdk\1.0.0-preview5-004233\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(82,5): error : Cannot find project info for 'C:\Users\svbomer\active\projects\managed_linker\test_app\Library\Library.csproj'. This can indicate a missing project reference. [C:\Users\svbomer\active\projects\managed_linker\test_app\App\test_app.csproj]
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview5-004233)
Product Information:
Version: 1.0.0-preview5-004233
Commit SHA-1 hash: 1fd99f1588
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: D:\cli\artifacts\win10-x64\stage2\sdk\1.0.0-preview5-004233
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 26 (20 by maintainers)
Commits related to this issue
- Disable standalone tests to workaround issues in MIcrosoft.NET.Sdk Re-enable when https://github.com/dotnet/sdk/issues/696 is resolved — committed to aspnet/IISIntegration by deleted user 7 years ago
- Disable standalone tests to workaround issues in Microsoft.NET.Sdk Re-enable when https://github.com/dotnet/sdk/issues/696 is resolved — committed to aspnet/IISIntegration by deleted user 7 years ago
- Update dependencies from https://github.com/aspnet/AspNetCore build 20190606.7 (#696) - Microsoft.AspNetCore.Mvc.Api.Analyzers - 3.0.0-preview7.19306.7 - Microsoft.AspNetCore.Mvc.Analyzers - 3.0.0-pr... — committed to mmitche/sdk by dotnet-maestro[bot] 5 years ago
Just thought I’d share that PR #828 should address the RID issue and does not introduce any new user gestures or concepts. We were able to keep the alternate property name as an internal contract between Referring projects and Referenced projects.
I’m trying a similar approach with the
build sln -fissue… though that is proving considerably more involved.