{"action":"closed","issue":{"url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs/issues/2396","repository_url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs","labels_url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs/issues/2396/labels{/name}","comments_url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs/issues/2396/comments","events_url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs/issues/2396/events","html_url":"https://github.com/MicrosoftDocs/visualstudio-docs/issues/2396","id":408386695,"node_id":"MDU6SXNzdWU0MDgzODY2OTU=","number":2396,"title":"Visual studio installed in container appears to partially break powershell or some part of package management","user":{"login":"paylocity-sflanders","id":28200306,"node_id":"MDQ6VXNlcjI4MjAwMzA2","avatar_url":"https://avatars2.githubusercontent.com/u/28200306?v=4","gravatar_id":"","url":"https://api.github.com/users/paylocity-sflanders","html_url":"https://github.com/paylocity-sflanders","followers_url":"https://api.github.com/users/paylocity-sflanders/followers","following_url":"https://api.github.com/users/paylocity-sflanders/following{/other_user}","gists_url":"https://api.github.com/users/paylocity-sflanders/gists{/gist_id}","starred_url":"https://api.github.com/users/paylocity-sflanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paylocity-sflanders/subscriptions","organizations_url":"https://api.github.com/users/paylocity-sflanders/orgs","repos_url":"https://api.github.com/users/paylocity-sflanders/repos","events_url":"https://api.github.com/users/paylocity-sflanders/events{/privacy}","received_events_url":"https://api.github.com/users/paylocity-sflanders/received_events","type":"User","site_admin":false},"labels":[{"id":725002723,"node_id":"MDU6TGFiZWw3MjUwMDI3MjM=","url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs/labels/area%20-%20installation","name":"area - installation","color":"23a3a8","default":false},{"id":481514928,"node_id":"MDU6TGFiZWw0ODE1MTQ5Mjg=","url":"https://api.github.com/repos/MicrosoftDocs/visualstudio-docs/labels/support%20request","name":"support request","color":"00b2ee","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-02-09T02:09:48Z","updated_at":"2019-02-11T19:51:10Z","closed_at":"2019-02-11T19:51:09Z","author_association":"NONE","body":"Was testing the functionality around doing builds in containers documented here\r\n\r\nhttps://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2017\r\n\r\nFor the most part i thought everything was working but was noticing some strange warnings in some powershell regarding a file missing in the temp folder.  It only seems to happen after installing vs build tools.  I noticed breaking errors when i tried running a build that used Pester.  Below are more details\r\n\r\n````\r\ndocker run --rm -it microsoft/dotnet-framework:4.7.1\r\nC:\\>powershell\r\nWindows PowerShell\r\nCopyright (C) 2016 Microsoft Corporation. All rights reserved.\r\n\r\nPS C:\\> Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop | Out-Null\r\nPS C:\\> Install-Module Pester -RequiredVersion 4.6.0 -Force -SkipPublisherCheck -Scope AllUsers -ErrorAction Stop\r\nPS C:\\> Import-Module Pester -RequiredVersion 4.6.0\r\nPS C:\\> Pester\\Invoke-Gherkin\r\nTesting all features in 'C:\\'\r\nPS C:\\>\r\n````\r\n\r\nAs you can see everything loads without issue.  Now if you create a docker file like:\r\n\r\n````\r\n# escape=`\r\n\r\nFROM microsoft/dotnet-framework:4.7.1\r\n\r\nSHELL [\"cmd\", \"/S\", \"/C\"]\r\nADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\\temp\\vs_buildtools.exe\r\nRUN C:\\temp\\vs_buildtools.exe --quiet --wait --norestart --nocache `\r\n    --installPath C:\\BuildTools `\r\n    --add Microsoft.VisualStudio.Workload.AzureBuildTools `\r\n    --add Microsoft.VisualStudio.Workload.DataBuildTools `\r\n    --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools `\r\n    --add Microsoft.VisualStudio.Workload.MSBuildTools `\r\n    --add Microsoft.VisualStudio.Workload.NetCoreBuildTools `\r\n    --add Microsoft.VisualStudio.Workload.NodeBuildTools `\r\n    --add Microsoft.VisualStudio.Workload.WebBuildTools `\r\n    --includeOptional --includeRecommended `\r\n || IF \"%ERRORLEVEL%\"==\"3010\" EXIT 0\r\n\r\nCMD [\"powershell.exe\", \"-NoLogo\", \"-ExecutionPolicy\", \"Bypass\"]\r\n````\r\n\r\nBuild the docker image and then run a command like:\r\n\r\n````\r\ndocker run --rm -it junk\r\n\r\nPS C:\\> Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop | Out-Null\r\nPS C:\\> Install-Module Pester -RequiredVersion 4.6.0 -Force -SkipPublisherCheck -Scope AllUsers -ErrorAction Stop\r\nPS C:\\> Import-Module Pester -RequiredVersion 4.6.0\r\nAdd-Type : Could not find file 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\vis2a0vm\\vis2a0vm.dll'.\r\n+ & $SafeCommands['Add-Type'] -TypeDefinition @'\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (:) [Add-Type], FileNotFoundException\r\n    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nAdd-Type : Could not find file 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\fnvgo3lr\\fnvgo3lr.dll'.\r\nAt C:\\Program Files\\WindowsPowerShell\\Modules\\Pester\\4.6.0\\Pester.psm1:630 char:1\r\n+ Add-Type -TypeDefinition @\"\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (:) [Add-Type], FileNotFoundException\r\n    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.AddTypeCommand\r\nPS C:\\> $Error.Exception\r\nCould not find file 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\2avljy0j\\2avljy0j.dll'.\r\nCould not find file 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\bbndgny5\\bbndgny5.dll'.\r\nCould not find file 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pk0vasom\\pk0vasom.dll'.\r\nUnable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry].\r\nPS C:\\> $Error.Exception.StackTrace\r\n   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n   at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)\r\n   at Microsoft.PowerShell.Commands.AddTypeCommand.CompileAssemblyFromSource(List`1 generatedTypes)\r\n   at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()\r\n   at System.Management.Automation.CommandProcessorBase.Complete()\r\n   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n   at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)\r\n   at Microsoft.PowerShell.Commands.AddTypeCommand.CompileAssemblyFromSource(List`1 generatedTypes)\r\n   at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()\r\n   at System.Management.Automation.CommandProcessorBase.Complete()\r\n   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n   at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)\r\n   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)\r\n   at Microsoft.PowerShell.Commands.AddTypeCommand.CompileAssemblyFromSource(List`1 generatedTypes)\r\n   at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()\r\n   at System.Management.Automation.CommandProcessorBase.Complete()\r\n   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)\r\n   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\nPS C:\\>\r\n````\r\n\r\nAs you can see Pester completely errors out.   The errors always seem to be related to the temp folder but i can see the folder is there.   Any ideas whats causing this behavior or how to fix it?\r\n\r\nI hit this issue on Windows Server 2016, 1607, 14393.2608  and Windows 10 Enterprise, 1709, 16299.904\r\n"}}
{"actor":{"display_login":"TerryGLee"}}