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

[BUG] Documentation / Build Task - Access to \Documents\WindowsPowerShell\Modules\CodeGenerationModules denied #5293

Closed
ghost opened this issue Feb 27, 2019 · 11 comments
Assignees
Labels
EngSys This issue is impacting the engineering system.

Comments

@ghost
Copy link

ghost commented Feb 27, 2019

Following the steps described under "To build" here (https://github.com/Azure/azure-sdk-for-net/blob/master/README.md), I ran into issues while executing "msbuild build.proj".

Setup delta:
Visual Studio 2019 Professional

#1 SN.exe is not available from 2019's Developer Command Prompt. One needs to specifically invoke it from "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools" (for some reason the DCP does not add this path to ENV while starting up?

#2 The steps ask us to exclude "tools\SdkBuildTools\tasks\net46\Microsoft.Azure.Sdk.Build.Tasks.dll". There is no such path(!). Instead, the current code base has a project that probably builds this DLL into the system.

#3 Ignoring #2, I went ahead and ran msbuild build.proj. The build itself ran fine, but suddenly threw up this error: \azure-sdk-for-net\tools\bootstrapTools\bootstrap.targets(5,4): error : Access to the path 'C:\Users\Sujay%20Sarma\Documents\WindowsPowerShell\Modules\CodeGenerationModules' is denied.

I hand-created that path and tried again. It failed again with the same error.

@triage-new-issues triage-new-issues bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 27, 2019
@kurtzeborn kurtzeborn added the Mgmt This issue is related to a management-plane library. label Mar 11, 2019
@triage-new-issues triage-new-issues bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 11, 2019
@kurtzeborn
Copy link
Member

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

CC: @shahabhijeet

@AlexGhiondea
Copy link
Contributor

@sujayvsarma can you tell me more about what you were trying to build?

@AlexGhiondea AlexGhiondea added EngSys This issue is impacting the engineering system. and removed Mgmt This issue is related to a management-plane library. labels Jul 30, 2019
@AlexGhiondea
Copy link
Contributor

@kurtzeborn @weshaggard with a clean repo, running msbuild build.proj at the root of the repo does not work:

Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 7/30/2019 9:14:09 AM.
Restoring packages for C:\Users\alexghi\AppData\Local\Temp\0e219c7f-2fbd-449e-8373-01519c06735a...
  CACHE https://api.nuget.org/v3-flatcontainer/microsoft.build.traversal/index.json
  GET https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-net/flatcontainer/microsoft.build.traversal/index.json
  CACHE https://api.nuget.org/v3-flatcontainer/microsoft.build.traversal/1.0.45/microsoft.build.traversal.1.0.45.nupkg
Installing Microsoft.Build.Traversal 1.0.45.
  NotFound https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-net/flatcontainer/microsoft.build.traversal/index.json 153ms
Restoring packages for C:\Users\alexghi\AppData\Local\Temp\0e219c7f-2fbd-449e-8373-01519c06735a...
  GET https://api.nuget.org/v3-flatcontainer/microsoft.internal.netsdkbuild.mgmt.tools/index.json
  GET https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-net/flatcontainer/microsoft.internal.netsdkbuild.mgmt.tools/index.json
  NotFound https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-net/flatcontainer/microsoft.internal.netsdkbuild.mgmt.tools/index.json 42ms
  NotFound https://api.nuget.org/v3-flatcontainer/microsoft.internal.netsdkbuild.mgmt.tools/index.json 238ms
D:\code\github\alex\net\eng\mgmt\Directory.Build.Mgmt.props(10,2): error : Unable to find package Microsoft.Internal.NetSdkBuild.Mgmt.Tools. No packages exist with this id in source(s): azure-sdk-for-net, nuget.org
D:\code\github\alex\net\eng\mgmt\Directory.Build.Mgmt.props(10,2): error : C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.Internal.NetSdkBuild.Mgmt.Tools\Sdk not found. Check that a recent enough .NET Core SDK is installed and/or increase t
he version specified in global.json.
Project "D:\code\github\alex\net\build.proj" on node 1 (default targets).
D:\code\github\alex\net\eng\mgmt\Directory.Build.Mgmt.props(10,77): error MSB4236: The SDK 'Microsoft.Internal.NetSdkBuild.Mgmt.Tools/0.12.0-dev.20190718.1' specified could not be found. [D:\code\github\alex\net\build.proj]
Done Building Project "D:\code\github\alex\net\build.proj" (default targets) -- FAILED.


Build FAILED.

  D:\code\github\alex\net\eng\mgmt\Directory.Build.Mgmt.props(10,2): error : Unable to find package Microsoft.Internal.NetSdkBuild.Mgmt.Tools. No packages exist with this id in source(s): azure-sdk-for-net, nuget.org
  D:\code\github\alex\net\eng\mgmt\Directory.Build.Mgmt.props(10,2): error : C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.Internal.NetSdkBuild.Mgmt.Tools\Sdk not found. Check that a recent enough .NET Core SDK is installed and/or increase
 the version specified in global.json.

Can one of you take a look?

@weshaggard
Copy link
Member

@AlexGhiondea I think that is because we need to do a restore first. If you are working on the build.proj itself we likely need to run "dotnet build build.proj" which will do a restore first. @chidozieononiwu could you add some information in the docs about this please.

@chidozieononiwu
Copy link
Member

I have added the changes to an existing PR #7098

@ghost
Copy link
Author

ghost commented Aug 10, 2019

Somehow, I missed the git-notification about this bug!

@AlexGhiondea - I was trying to build the repo as per the instructions in the BUILD doc.

@weshaggard - That doesn't work. I started with a clean folder, cloned this repo and followed the BUILD doc to a T.

@chidozieononiwu - I am sorry, but your PR contains confusing instructions.

@weshaggard
Copy link
Member

@sujayvsarma can you please list out the exact commands you have run and the output you are receiving?

@ghost
Copy link
Author

ghost commented Aug 12, 2019

@weshaggard I have already provided the complete list of steps in my original bug report at the top of this thread. What more are you looking for?

@chidozieononiwu
Copy link
Member

@sujayvsarma The contributing guide has been updated. The steps requiring sn.exe are no longer included.

@weshaggard
Copy link
Member

@sujayvsarma the steps you outlined in your original post are not the steps in the documentation. Have you tried running dotnet build build.proj?

@ghost
Copy link
Author

ghost commented Aug 13, 2019

Okay. Then go ahead and consider this closed.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
EngSys This issue is impacting the engineering system.
Projects
None yet
Development

No branches or pull requests

4 participants