RoslynCodeTaskFactory fails when using MSBuild OM inside the task
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
This is a simplified version of a Microsoft build task:
```xml
```
It doesn't build:
```sh-session
repro failed with 10 error(s) (0.4s)
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(89,68): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(89,49): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(89,49): error CS0012: The type 'XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml.ReaderWriter, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(91,72): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(92,23): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(93,23): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(94,23): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp(96,28): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
S:\work\msbuild2\brett.proj(3,5): error The source file for this compilation can be found at: "C:\Users\raines\AppData\Local\Temp\MSBuildTempymbqlpor.vn4\tmpadf45b9d056f4ab48e718979dc39b4c6.tmp"
S:\work\msbuild2\brett.proj(3,5): error MSB4036: The "GenerateVersionPropertyFile" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files\dotnet\sdk\10.0.200-preview.0.26103.119" directory.
Build failed with 10 error(s) in 0.5s
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.