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

Global.json file prevents building on newest SDK #76

Closed
goldstar611 opened this issue Apr 5, 2019 · 1 comment
Closed

Global.json file prevents building on newest SDK #76

goldstar611 opened this issue Apr 5, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@goldstar611
Copy link

Describe the bug
Following build instructions on Ubuntu Linux 16.04, running any commands that involves dotnet fails with the following error:

user@ubuntu:~/Desktop/AttackSurfaceAnalyzer/Tools$ dotnet tool install ElectronNET.CLI -g --version 0.0.11-custom --add-source packages

user@ubuntu:~/Desktop/AttackSurfaceAnalyzer/Tools$ dotnet --version
A compatible SDK version for global.json version: [2.2.105] from [/home/user/Desktop/AttackSurfaceAnalyzer/global.json] was not found
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

user@ubuntu:~/Desktop/AttackSurfaceAnalyzer/Tools$ cd ..

user@ubuntu:~/Desktop/AttackSurfaceAnalyzer$ dotnet --version
A compatible SDK version for global.json version: [2.2.105] from [/home/user/Desktop/AttackSurfaceAnalyzer/global.json] was not found
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

user@ubuntu:~/Desktop/AttackSurfaceAnalyzer$ cd ..

user@ubuntu:~/Desktop$ dotnet --version
2.2.202

Ok, so dotnet will fail hard if it finds a global.json file. I finally got the version out of dotnet after changing to the Desktop directory. I have 2.2.202

Inspecting the global.json file that ships with ASA source code we can see a value of 2.2.105. Changing this to the version I have 2.2.202 makes dotnet happy.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Ubuntu VM
  2. Install dotnet as found in https://dotnet.microsoft.com/download/linux-package-manager/ubuntu16-04/sdk-2.2.202
  3. git clone ASA
  4. Follow the build instructions at https://github.com/Microsoft/AttackSurfaceAnalyzer/blob/master/BUILD.md

Expected behavior
Installing a higher version of dotnet works just fine

Screenshots
N/A

System Configuration (please complete the following information):

  • OS: Ubuntu 16.04
  • OS Version: 16.04.6
  • Application Version: master
  • CLI or GUI: Tools

Additional Context
Add any other context about the problem here.

@goldstar611 goldstar611 added the bug Something isn't working label Apr 5, 2019
@goldstar611 goldstar611 changed the title Linux Building Linux Building - Tools Apr 5, 2019
@gfs gfs changed the title Linux Building - Tools Global.json file prevents building on newest SDK Apr 5, 2019
@gfs
Copy link
Contributor

gfs commented Apr 5, 2019

Thanks. I think I can just remove the Global.json file to avoid running into this.

@gfs gfs mentioned this issue Apr 5, 2019
@gfs gfs closed this as completed in #85 Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants