Skip to content

Time to get rid of build.cmd? #787

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

Closed
rkeithhill opened this issue Jun 17, 2017 · 9 comments · Fixed by #1011
Closed

Time to get rid of build.cmd? #787

rkeithhill opened this issue Jun 17, 2017 · 9 comments · Fixed by #1011

Comments

@rkeithhill
Copy link
Contributor

Tried to build PSSA with build.cmd and these errors:

30:59ms> .\build.cmd
Installing .NET Version Manager to C:\Users\Keith\.dnx\bin
Creating destination folder 'C:\Users\Keith\.dnx\bin' ...
Installing 'dnvm.ps1' to 'C:\Users\Keith\.dnx\bin' ...
Installing 'dnvm.cmd' to 'C:\Users\Keith\.dnx\bin' ...
Adding C:\Users\Keith\.dnx\bin to Process PATH
Adding C:\Users\Keith\.dnx\bin to User PATH
Adding C:\Users\Keith\.dnx to Process DNX_HOME
Adding C:\Users\Keith\.dnx to User DNX_HOME
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 6/17/2017 12:12:19 PM.
Project "C:\Users\Keith\GitHub\rkeithhill\PSScriptAnalyzer\PSScriptAnalyzer.sln" on node 1 (default targets).
C:\Users\Keith\GitHub\rkeithhill\PSScriptAnalyzer\PSScriptAnalyzer.sln.metaproj : error MSB4126: The specified solution
 configuration "|Any CPU" is invalid. Please specify a valid solution configuration using the Configuration and Platfor
m properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties bla
nk to use the default solution configuration. [C:\Users\Keith\GitHub\rkeithhill\PSScriptAnalyzer\PSScriptAnalyzer.sln]
Done Building Project "C:\Users\Keith\GitHub\rkeithhill\PSScriptAnalyzer\PSScriptAnalyzer.sln" (default targets) -- FAI
LED.

I also thought that .NET Core no longer uses $home/.dnx.

@daviwil
Copy link
Contributor

daviwil commented Jun 17, 2017

PSScriptAnalyzer hasn't moved to dotnet CLI 1.0 yet so it's still on one of the preview releases before the csproj changeover. Looks like the proper way to invoke the build(s) is here:

https://github.com/PowerShell/PSScriptAnalyzer/blob/development/appveyor.yml#L27

@kapilmb
Copy link

kapilmb commented Jun 17, 2017

Yes, we need a proper build system for PSSA. Right now it is just a custom script buildCoreClr.ps1. I have been debating for while what build system to use - Invoke-Build or psake?

@kapilmb
Copy link

kapilmb commented Jun 17, 2017

Any opinions/suggestions on the choice of build tool are welcome.

@daviwil
Copy link
Contributor

daviwil commented Jun 17, 2017

Your only option for cross-platform builds right now is Invoke-Build until we kick out a new psake release with cross-platform support.

@rkeithhill
Copy link
Contributor Author

There is a pending PR that is supposed to fix a number of cross-plat issues - https://github.com/psake/psake/pull/198/files

Most of it looks good. I wonder if that would be enough to build basic modules. There's still work to be done to get a .NET Core build environment going.

@bergmeister
Copy link
Collaborator

bergmeister commented Jul 23, 2017

On a related note: The AppVeyor build does not work in my fork (maybe this should be a separate issue?). See e.g. here. The error that I get is:
Failed to setup build job 'Environment: APPVEYOR_BUILD_WORKER_IMAGE=WMF 4, PowerShellEdition=Desktop, BuildConfiguration=PSv3Release': Build worker image not found: WMF 4
In my AppVeyor settings for the build worker image I can see a dropdown for WMF5 but not WMF4 (I have tried 'Visual Studio 2013' and 'Previous Visual Studio 2013' as an alternative and I still got the same error).

Also what would it take to upgrade to the latest version of the .Net Core SDK? Just upgrading from project.json to csproj or more?

@JamesWTruher
Copy link
Contributor

I definitely want to move toward an improved experience for folks working both in PSCore and PSSA. PSSA is already at 2.1.4 (although, we will need to roll back to 2.0 to match PSCore) that way you only need one set of dotnet cli tools to build both

@bergmeister
Copy link
Collaborator

bergmeister commented Jan 23, 2018

OK, I don't mind rolling back the SDK one minor version but keep in mind that PSCore want to upgrade the SDK to 2.1.4 soon, see comment here
What do you think about the issue that CI does not work in forks but due the WMF4 image not being publicly available any more?

@iSazonov
Copy link

As I commented in #854

The only reason we decoupled the SDK and Runtime versions in PowerShell Core repo is that the new CLI versions violated PowerShell Core build process several times. I hope it doesn't matter here.

I push PowerShell/PowerShell#6054 to move to SDK 2.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants