dotnet / dotnet/Scaffolding

TargetInstaller does not respect MSBuildProjectExtensionsPath

Open
#1,752 0 comments 0 reactions 0 assignees View on GitHub
area-scaffolding customer-reported
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

## File a bug
`TargetInstaller` does not respect [MSBuildProjectExtensionsPath](https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#msbuildprojectextensionspath). It insists on using the directory `./obj` at all times.

### Include your code

```xml
/tmp/tmp.Lnj96ItgLU/tmp/tmp.Lnj96ItgLU

```

### Include stack traces

```
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.TargetInstaller.EnsureTargetImported(String projectName, String targetLocation)
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.GetProjectInformation(String projectPath, String configuration)
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.<>c__DisplayClass19_0.b__0()
```

### Include provider and version information

Microsoft.VisualStudio.Web.CodeGeneration.Design/Microsoft.DotNet.MSIdentity version:
1.0.0
Target framework: (e.g. .NET 5.0)
net6.0
Operating system:
Linux x64 5.15.7-1-default
IDE: (e.g. Visual Studio 2019 16.3)
1.63.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.