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

Support for .NET Core .csproj files? #3311

Closed
mikeesouth opened this issue Dec 27, 2016 · 90 comments
Closed

Support for .NET Core .csproj files? #3311

mikeesouth opened this issue Dec 27, 2016 · 90 comments
Assignees

Comments

@mikeesouth
Copy link

Hi,

I'm using ASP.NET Core with the latest dotnet CLI tools (.NET Command Line Tools (1.0.0-preview4-004233)) that uses .csproj files and no longer the project.json file.

The dotnet command uses msbuild internally if I understand it correctly but the VSTS Tasks marked with "Restore/Build/Publish .NET Core (Preview)" does not work. I get this error: error: Invalid input 'C:/a/1/s/server/server.csproj'. The file type was not recognized.

Maybe I can use the MSBuild tasks?

According to this link, the hosted pool should support .NET Core 1.1 and I would assume the latest dotnet CLI tools as well?

The full log for .NET Core (Preview) Restore task:

2016-12-27T09:12:58.5105042Z ##[section]Starting: Restore
2016-12-27T09:12:58.5544954Z ==============================================================================
2016-12-27T09:12:58.5544954Z Task         : .NET Core (PREVIEW)
2016-12-27T09:12:58.5544954Z Description  : Build, test and publish using dotnet core command-line.
2016-12-27T09:12:58.5544954Z Version      : 0.1.0
2016-12-27T09:12:58.5544954Z Author       : Microsoft Corporation
2016-12-27T09:12:58.5544954Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2016-12-27T09:12:58.5544954Z ==============================================================================
2016-12-27T09:13:00.1207826Z [command]C:\Program Files\dotnet\dotnet.exe restore C:/a/1/s/server/server.csproj
2016-12-27T09:13:55.3911318Z 
2016-12-27T09:13:55.3911318Z Welcome to .NET Core!
2016-12-27T09:13:55.3911318Z ---------------------
2016-12-27T09:13:55.3911318Z Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
2016-12-27T09:13:55.3911318Z Telemetry
2016-12-27T09:13:55.3911318Z --------------
2016-12-27T09:13:55.3911318Z The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
2016-12-27T09:13:55.3911318Z You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
2016-12-27T09:13:55.3911318Z You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
2016-12-27T09:13:55.3911318Z Configuring...
2016-12-27T09:13:55.3911318Z -------------------
2016-12-27T09:13:55.3911318Z A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
2016-12-27T09:13:55.3921321Z Decompressing 0%����������������Decompressing 1%����������������Decompressing 2%����������������Decompressing 3%����������������Decompressing 4%����������������Decompressing 5%����������������Decompressing 6%����������������Decompressing 7%����������������Decompressing 8%����������������Decompressing 9%����������������Decompressing 10%�����������������Decompressing 11%�����������������Decompressing 12%�����������������Decompressing 13%�����������������Decompressing 14%�����������������Decompressing 15%�����������������Decompressing 16%�����������������Decompressing 17%�����������������Decompressing 18%�����������������Decompressing 19%�����������������Decompressing 20%�����������������Decompressing 21%�����������������Decompressing 22%�����������������Decompressing 23%�����������������Decompressing 24%�����������������Decompressing 25%�����������������Decompressing 26%�����������������Decompressing 27%�����������������Decompressing 28%�����������������Decompressing 29%�����������������Decompressing 30%�����������������Decompressing 31%�����������������Decompressing 32%�����������������Decompressing 33%�����������������Decompressing 34%�����������������Decompressing 35%�����������������Decompressing 36%�����������������Decompressing 37%�����������������Decompressing 38%�����������������Decompressing 39%�����������������Decompressing 40%�����������������Decompressing 41%�����������������Decompressing 42%�����������������Decompressing 43%�����������������Decompressing 44%�����������������Decompressing 45%�����������������Decompressing 46%�����������������Decompressing 47%�����������������Decompressing 48%�����������������Decompressing 49%�����������������Decompressing 50%�����������������Decompressing 51%�����������������Decompressing 52%�����������������Decompressing 53%�����������������Decompressing 54%�����������������Decompressing 55%�����������������Decompressing 56%�����������������Decompressing 57%�����������������Decompressing 58%�����������������Decompressing 59%�����������������Decompressing 60%�����������������Decompressing 61%�����������������Decompressing 62%�����������������Decompressing 63%�����������������Decompressing 64%�����������������Decompressing 65%�����������������Decompressing 66%�����������������Decompressing 67%�����������������Decompressing 68%�����������������Decompressing 69%�����������������Decompressing 70%�����������������Decompressing 71%�����������������Decompressing 72%�����������������Decompressing 73%�����������������Decompressing 74%�����������������Decompressing 75%�����������������Decompressing 76%�����������������Decompressing 77%�����������������Decompressing 78%�����������������Decompressing 79%�����������������Decompressing 80%�����������������Decompressing 81%�����������������Decompressing 82%�����������������Decompressing 83%�����������������Decompressing 84%�����������������Decompressing 85%�����������������Decompressing 86%�����������������Decompressing 87%�����������������Decompressing 88%�����������������Decompressing 89%�����������������Decompressing 90%�����������������Decompressing 91%�����������������Decompressing 92%�����������������Decompressing 93%�����������������Decompressing 94%�����������������Decompressing 95%�����������������Decompressing 96%�����������������Decompressing 97%�����������������Decompressing 98%�����������������Decompressing 99%�����������������Decompressing 100% 6221 ms
2016-12-27T09:13:55.3921321Z Expanding 0%������������Expanding 1%������������Expanding 2%������������Expanding 3%������������Expanding 4%������������Expanding 5%������������Expanding 6%������������Expanding 7%������������Expanding 8%������������Expanding 9%������������Expanding 10%�������������Expanding 11%�������������Expanding 12%�������������Expanding 13%�������������Expanding 14%�������������Expanding 15%�������������Expanding 16%�������������Expanding 17%�������������Expanding 18%�������������Expanding 19%�������������Expanding 20%�������������Expanding 21%�������������Expanding 22%�������������Expanding 23%�������������Expanding 24%�������������Expanding 25%�������������Expanding 26%�������������Expanding 27%�������������Expanding 28%�������������Expanding 29%�������������Expanding 30%�������������Expanding 31%�������������Expanding 32%�������������Expanding 33%�������������Expanding 34%�������������Expanding 35%�������������Expanding 36%�������������Expanding 37%�������������Expanding 38%�������������Expanding 39%�������������Expanding 40%�������������Expanding 41%�������������Expanding 42%�������������Expanding 43%�������������Expanding 44%�������������Expanding 45%�������������Expanding 46%�������������Expanding 47%�������������Expanding 48%�������������Expanding 49%�������������Expanding 50%�������������Expanding 51%�������������Expanding 52%�������������Expanding 53%�������������Expanding 54%�������������Expanding 55%�������������Expanding 56%�������������Expanding 57%�������������Expanding 58%�������������Expanding 59%�������������Expanding 60%�������������Expanding 61%�������������Expanding 62%�������������Expanding 63%�������������Expanding 64%�������������Expanding 65%�������������Expanding 66%�������������Expanding 67%�������������Expanding 68%�������������Expanding 69%�������������Expanding 70%�������������Expanding 71%�������������Expanding 72%�������������Expanding 73%�������������Expanding 74%�������������Expanding 75%�������������Expanding 76%�������������Expanding 77%�������������Expanding 78%�������������Expanding 79%�������������Expanding 80%�������������Expanding 81%�������������Expanding 82%�������������Expanding 83%�������������Expanding 84%�������������Expanding 85%�������������Expanding 86%�������������Expanding 87%�������������Expanding 88%�������������Expanding 89%�������������Expanding 90%�������������Expanding 91%�������������Expanding 92%�������������Expanding 93%�������������Expanding 94%�������������Expanding 95%�������������Expanding 96%�������������Expanding 97%�������������Expanding 98%�������������Expanding 99%�������������Expanding 100% 19039 ms
2016-12-27T09:13:55.3921321Z error: Invalid input 'C:/a/1/s/server/server.csproj'. The file type was not recognized.
2016-12-27T09:13:55.4061327Z ##[error]Dotnet command failed with non-zero exit code: 1.
2016-12-27T09:13:55.4101313Z ##[section]Finishing: Restore
2016-12-27T09:12:58.5105042Z ##[section]Starting: Restore
2016-12-27T09:12:58.5544954Z ==============================================================================
2016-12-27T09:12:58.5544954Z Task         : .NET Core (PREVIEW)
2016-12-27T09:12:58.5544954Z Description  : Build, test and publish using dotnet core command-line.
2016-12-27T09:12:58.5544954Z Version      : 0.1.0
2016-12-27T09:12:58.5544954Z Author       : Microsoft Corporation
2016-12-27T09:12:58.5544954Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2016-12-27T09:12:58.5544954Z ==============================================================================
2016-12-27T09:13:00.1207826Z [command]C:\Program Files\dotnet\dotnet.exe restore C:/a/1/s/server/server.csproj
2016-12-27T09:13:55.3911318Z 
2016-12-27T09:13:55.3911318Z Welcome to .NET Core!
2016-12-27T09:13:55.3911318Z ---------------------
2016-12-27T09:13:55.3911318Z Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
2016-12-27T09:13:55.3911318Z Telemetry
2016-12-27T09:13:55.3911318Z --------------
2016-12-27T09:13:55.3911318Z The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
2016-12-27T09:13:55.3911318Z You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
2016-12-27T09:13:55.3911318Z You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
2016-12-27T09:13:55.3911318Z Configuring...
2016-12-27T09:13:55.3911318Z -------------------
2016-12-27T09:13:55.3911318Z A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
2016-12-27T09:13:55.3921321Z Decompressing 0%����������������Decompressing 1%����������������Decompressing 2%����������������Decompressing 3%����������������Decompressing 4%����������������Decompressing 5%����������������Decompressing 6%����������������Decompressing 7%����������������Decompressing 8%����������������Decompressing 9%����������������Decompressing 10%�����������������Decompressing 11%�����������������Decompressing 12%�����������������Decompressing 13%�����������������Decompressing 14%�����������������Decompressing 15%�����������������Decompressing 16%�����������������Decompressing 17%�����������������Decompressing 18%�����������������Decompressing 19%�����������������Decompressing 20%�����������������Decompressing 21%�����������������Decompressing 22%�����������������Decompressing 23%�����������������Decompressing 24%�����������������Decompressing 25%�����������������Decompressing 26%�����������������Decompressing 27%�����������������Decompressing 28%�����������������Decompressing 29%�����������������Decompressing 30%�����������������Decompressing 31%�����������������Decompressing 32%�����������������Decompressing 33%�����������������Decompressing 34%�����������������Decompressing 35%�����������������Decompressing 36%�����������������Decompressing 37%�����������������Decompressing 38%�����������������Decompressing 39%�����������������Decompressing 40%�����������������Decompressing 41%�����������������Decompressing 42%�����������������Decompressing 43%�����������������Decompressing 44%�����������������Decompressing 45%�����������������Decompressing 46%�����������������Decompressing 47%�����������������Decompressing 48%�����������������Decompressing 49%�����������������Decompressing 50%�����������������Decompressing 51%�����������������Decompressing 52%�����������������Decompressing 53%�����������������Decompressing 54%�����������������Decompressing 55%�����������������Decompressing 56%�����������������Decompressing 57%�����������������Decompressing 58%�����������������Decompressing 59%�����������������Decompressing 60%�����������������Decompressing 61%�����������������Decompressing 62%�����������������Decompressing 63%�����������������Decompressing 64%�����������������Decompressing 65%�����������������Decompressing 66%�����������������Decompressing 67%�����������������Decompressing 68%�����������������Decompressing 69%�����������������Decompressing 70%�����������������Decompressing 71%�����������������Decompressing 72%�����������������Decompressing 73%�����������������Decompressing 74%�����������������Decompressing 75%�����������������Decompressing 76%�����������������Decompressing 77%�����������������Decompressing 78%�����������������Decompressing 79%�����������������Decompressing 80%�����������������Decompressing 81%�����������������Decompressing 82%�����������������Decompressing 83%�����������������Decompressing 84%�����������������Decompressing 85%�����������������Decompressing 86%�����������������Decompressing 87%�����������������Decompressing 88%�����������������Decompressing 89%�����������������Decompressing 90%�����������������Decompressing 91%�����������������Decompressing 92%�����������������Decompressing 93%�����������������Decompressing 94%�����������������Decompressing 95%�����������������Decompressing 96%�����������������Decompressing 97%�����������������Decompressing 98%�����������������Decompressing 99%�����������������Decompressing 100% 6221 ms
2016-12-27T09:13:55.3921321Z Expanding 0%������������Expanding 1%������������Expanding 2%������������Expanding 3%������������Expanding 4%������������Expanding 5%������������Expanding 6%������������Expanding 7%������������Expanding 8%������������Expanding 9%������������Expanding 10%�������������Expanding 11%�������������Expanding 12%�������������Expanding 13%�������������Expanding 14%�������������Expanding 15%�������������Expanding 16%�������������Expanding 17%�������������Expanding 18%�������������Expanding 19%�������������Expanding 20%�������������Expanding 21%�������������Expanding 22%�������������Expanding 23%�������������Expanding 24%�������������Expanding 25%�������������Expanding 26%�������������Expanding 27%�������������Expanding 28%�������������Expanding 29%�������������Expanding 30%�������������Expanding 31%�������������Expanding 32%�������������Expanding 33%�������������Expanding 34%�������������Expanding 35%�������������Expanding 36%�������������Expanding 37%�������������Expanding 38%�������������Expanding 39%�������������Expanding 40%�������������Expanding 41%�������������Expanding 42%�������������Expanding 43%�������������Expanding 44%�������������Expanding 45%�������������Expanding 46%�������������Expanding 47%�������������Expanding 48%�������������Expanding 49%�������������Expanding 50%�������������Expanding 51%�������������Expanding 52%�������������Expanding 53%�������������Expanding 54%�������������Expanding 55%�������������Expanding 56%�������������Expanding 57%�������������Expanding 58%�������������Expanding 59%�������������Expanding 60%�������������Expanding 61%�������������Expanding 62%�������������Expanding 63%�������������Expanding 64%�������������Expanding 65%�������������Expanding 66%�������������Expanding 67%�������������Expanding 68%�������������Expanding 69%�������������Expanding 70%�������������Expanding 71%�������������Expanding 72%�������������Expanding 73%�������������Expanding 74%�������������Expanding 75%�������������Expanding 76%�������������Expanding 77%�������������Expanding 78%�������������Expanding 79%�������������Expanding 80%�������������Expanding 81%�������������Expanding 82%�������������Expanding 83%�������������Expanding 84%�������������Expanding 85%�������������Expanding 86%�������������Expanding 87%�������������Expanding 88%�������������Expanding 89%�������������Expanding 90%�������������Expanding 91%�������������Expanding 92%�������������Expanding 93%�������������Expanding 94%�������������Expanding 95%�������������Expanding 96%�������������Expanding 97%�������������Expanding 98%�������������Expanding 99%�������������Expanding 100% 19039 ms
2016-12-27T09:13:55.3921321Z error: Invalid input 'C:/a/1/s/server/server.csproj'. The file type was not recognized.
2016-12-27T09:13:55.4061327Z ##[error]Dotnet command failed with non-zero exit code: 1.
2016-12-27T09:13:55.4101313Z ##[section]Finishing: Restore
@sachinma sachinma self-assigned this Jan 12, 2017
@sachinma
Copy link
Member

If you are using hosted agent - then the tooling there works only with project.json files. We will be working on adding support for csproj based .Net Core projects to hosted images. However, if you use your own agent and install the tools supporting csproj files - the task would work.

@zidad
Copy link

zidad commented Jan 16, 2017

@sachinma, I don't fully understand, when using VS2017RC the project.json files are deprecated when converting the solution, so we can't build VS2017 projects now at all on a hosted build agent?

@sachinma
Copy link
Member

You are right about your understanding of the current state. VS2017 RC based .Net core projects cannot be compiled on the hosted build agent right now. As I mentioned, we are working to add that capability. In the meantime, as a workaround you can use a private build agent which has the right version of .net core tools and then use the task.

@zidad
Copy link

zidad commented Jan 16, 2017

Thanks!

I was hoping there would be some hackety-hackety way we could still build it on the hosted build agent, but I'll end my quest here :)

@vip32
Copy link

vip32 commented Feb 17, 2017

hi @sachinma any ETA for building core on vsts (hosted build)? will it be available when vs2017 RTMs early march?

@Jonathan34
Copy link

It would be great if VSTS kept up more closely with .net core... right now, we re a bit stuck without any real timeline.

@bryanmacfarlane
Copy link
Contributor

bryanmacfarlane commented Feb 23, 2017

Yes. When it RTMs, it will be on our image. We've been keeping up with it. The issue is we have one hosted image. That image is at max size (128GB) due to all the versions of VS and other tools. So for that reason, we will have to pull older versions and replace with 2017. In parallel we have multi image support in the pipeline to address the main problem. With that, we'll have an image per era of VS and even be able to release preview images before RTM of next VS versions.

In the meantime, private agents are an option and private agents work with VSTS.

@piquet-h
Copy link
Member

piquet-h commented Mar 3, 2017

Why is this marked as closed though? It's clearly not fixed yet.

@vip32
Copy link

vip32 commented Mar 3, 2017

this is really holding us back from doing any .net core projects at the moment. hope it will be fixed as soon as RTM releases next week! private agents are no solution, as we use this whole vsts as a service to stay out of that nightmare.

@aciechomski
Copy link

VS 2017 released and still not working

@nperno
Copy link

nperno commented Mar 7, 2017

Not working for me either. Is the .Net Core (Preview) build step still the right one to use or should we be using the MSBuild step?

@AlaricDelany
Copy link

Is there a plan when the new (and now Released) Csproj Format Support will be there for Hosted Agents?
It would be helpfull to know, because when someone would say Q3 2017 then (for me) it would make sence to spent time to build a Strategy for Automating the Setup of Build Agents and just forget about the Hosted Agents. (And when i would have to care about the Agents why then not using directly an On-Promise Installation...)

@srpeterson
Copy link

srpeterson commented Mar 8, 2017

Not working for me, either... sigh... Brand new core 1.1 web app project created in VS 2017, new VSO project collection. New build definition from the .NET Core (PREVIEW) template.. Bombs. Says that .csproj file not recognized. All rainbows and lollipops in the VS launch demos today, but in real life.. sigh..

@rbarschaw
Copy link

I am having the same problem

2017-03-08T00:31:16.8747494Z ##[section]Starting: Restore
2017-03-08T00:31:16.9217495Z ==============================================================================
2017-03-08T00:31:16.9217495Z Task : .NET Core (PREVIEW)
2017-03-08T00:31:16.9217495Z Description : Build, test and publish using dotnet core command-line.
2017-03-08T00:31:16.9217495Z Version : 0.4.1
2017-03-08T00:31:16.9217495Z Author : Microsoft Corporation
2017-03-08T00:31:16.9217495Z Help : More Information
2017-03-08T00:31:16.9217495Z ==============================================================================
2017-03-08T00:31:18.5392559Z [command]C:\Program Files\dotnet\dotnet.exe restore D:\a\1\s\LifestyleFlexibility\LifestyleFlexibility.csproj
2017-03-08T00:32:41.2362472Z
2017-03-08T00:32:41.2372463Z Welcome to .NET Core!
2017-03-08T00:32:41.2422475Z ---------------------
2017-03-08T00:32:41.2422475Z Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
2017-03-08T00:32:41.2422475Z Telemetry
2017-03-08T00:32:41.2432475Z --------------
2017-03-08T00:32:41.2432475Z The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
2017-03-08T00:32:41.2432475Z You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
2017-03-08T00:32:41.2432475Z You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
2017-03-08T00:32:41.2432475Z Configuring...
2017-03-08T00:32:41.2432475Z -------------------
2017-03-08T00:32:41.2432475Z A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
2017-03-08T00:32:41.2445274Z error: Invalid input 'D:\a\1\s\test\test.csproj'. The file type was not recognized.
2017-03-08T00:32:41.2542476Z ##[error]Dotnet command failed with non-zero exit code: 1.
2017-03-08T00:32:41.2582479Z ##[section]Finishing: Restore

@jeffputz
Copy link

jeffputz commented Mar 8, 2017

This is endlessly frustrating... the end to end tooling still isn't there. Every time you think we're good to start using Core in a meaningful way, something else isn't "done."

@lostmsu
Copy link

lostmsu commented Mar 8, 2017

That is clearly not out yet.

@dieterhowest
Copy link

still not working :(

@Jonathan34
Copy link

Jonathan34 commented Mar 8, 2017

for those who are blocked, i created a task group that downloads the latest tools and unzip in my sources directory. i then use command lines with what i downloaded. works fine if you don't mind downloading and unpacking everytime.

alternatively, you may use the dotnet install script (there is a version for linux and windows). havent tried that one...

@odinnix
Copy link

odinnix commented Mar 9, 2017

Why is this closed? It is currently impossible to build csproj based .NET Core projects on VSO.

Is there an ETA at least? Every reference I can find says "by RTM".

Some people rely on VSO for dev-ops and production...

@moattarwork
Copy link

+1

@srpeterson
Copy link

I agree with with dcarl.. Why is this closed???? I spent all day yesterday trying to get a VS 2017 .csproj to build on VSO. Tried MSbuild, Visual Studio 2017 build steps.. no success. In addition, another unit test project that was still project.json based starting failing on VSO the minute I upped it to .NET Core App 1.1.1. Had to rollback to 1.1.0. Sigh... I am really getting tired of the constant frustration of "RTM" products that are released which are clearly not ready. I am the lead developer at my company giving VS 2017 a test run. I can not recommend that our company upgrade to VS 2017 until at least SP 1 comes out. Sound familiar from the old days?

@bryanmacfarlane
Copy link
Contributor

I'll reopen till your scenario works.

There's two separate things - the tasks (this repo) and the hosted pool image which doesn't have 2017 and new dotnet cli tooling installed on it (not covered in this repo).

Good news is that image is rolling out now ( we were waiting for final build which we have).

You will see another Queue for your def to target (VS2017).

Other piece of good news for the future we will have multi image support on hosted. That will allow us to have separate images with early previews of tooling, images for different toolsets like java etc... Smaller images that make us more nimble rolling out things (our monolithic image was 128GB and regen would reset testing on every dev scenario).

Hopefully that explains it a bit better.

@dcarl1 @srpeterson @moattarwork - we will wait for your ack and feedback on the overall scenario to close.

Sorry for you issues here.

@srpeterson
Copy link

Thank you for your quick response. I will give it another shot later on today and provide feedback

@michaelbowman1024-zz
Copy link

@bryanmacfarlane Good day. I understand the image is quite big, and may take some time to roll out. As of right now, I do not see that new Queue option. Is there an expected ETA for this to be completed?

@odinnix
Copy link

odinnix commented Mar 9, 2017

@bryanmacfarlane Thank you. With newly released dev tools Github is the best (and often only) resource to get information about what is working within the tool chain. Having the ticket open until it works at least prevents people from wasting time trying to get it to work.

@srpeterson
Copy link

I'm happy to report that my .NET Core (Preview) build steps work correctly now.

@chrispat
Copy link
Contributor

chrispat commented Mar 21, 2017

@lostmsu my guess is you are not restoring your packages.

I just imported your repository and verified that it builds just fine on the VS 2017 queue. I simply had to dotnet restore on the solution and dotnet build on the solution.

@awcab
Copy link

awcab commented Mar 21, 2017

I think I ran into this bug. Switching to nuget 3.3 allowed packages to restore.

@chrispat
Copy link
Contributor

@awcab you can also just run dotnet restore. In addition NuGet 4 will be rolling out starting next week.

@awcab
Copy link

awcab commented Mar 21, 2017

Ah, thanks @chrisrpatterson ! I didn't think about that. Still getting used to the new core tools.

@tiagorosendo
Copy link

I got this errror:

2017-03-21T18:52:33.6424886Z
2017-03-21T18:52:33.6424886Z 'gulp' is not recognized as an internal or external command,
2017-03-21T18:52:33.6424886Z operable program or batch file.

anyone can help-me ?

@dracan
Copy link

dracan commented Mar 21, 2017

I got a similar one about Bower. Worked fine in VSTS before I upgraded to 2017 csproj. Not had chance yet to work out why though.

@thechrisjohnson
Copy link
Contributor

@tiagorosendo, @dracan The VS 2017 does not have any npm packages installed globally, like the old image did (due to not installing Cordova). Do you have gulp or bower in your project.json file as a requirement? The tasks should be able to find those in the local npm module cache without a problem.

@JacobAtchley
Copy link

@tiagorosendo I ran into this issue today as well. My resolution was to invoke the npm, bower, and gulp task outside of the MSBuild using the VSTS tasks.

you will need to remove "PrepareForPublish" target in your csproj

<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
    <!--<Exec Command="npm install" />-->
    <!--<Exec Command="bower install" />-->
    <!--<Exec Command="gulp all" />-->
  </Target>

image

@JacobAtchley
Copy link

I also had an issue with including dotnet core web jobs into the project.
this is my work around. If anyone knows of a better solution i'd love to hear it:

<Target Name="PostpublishScript" AfterTargets="Publish">
    <Exec Command="dotnet publish ..\WebJobContinuous\ -c Release -o $(PublishDir)\app_data\jobs\Continuous\WebJobContinuous\" />
    <Exec Command="dotnet publish ..\WebJobTriggered\ -c Release -o $(PublishDir)\app_data\jobs\Triggered\WebJobTriggered\" />
  </Target>

@Jonathan34
Copy link

tested and working. much easier now :) thanks

@dracan
Copy link

dracan commented Mar 22, 2017

@JacobAtchley Thanks for that info. I've tried what you described, but I get the following error in the bower install task ...

Your NPM global location is not in PATH, add the result of 'npm prefix -g' to your PATH and try again

Did you have to do anything additional to set that PATH?

@awcab
Copy link

awcab commented Mar 22, 2017

@dracan Since node is included with visual studio, you can bootstrap the whole install like this:

<Target Name="InstallDeps" BeforeTargets="BeforeBuild">
   <Exec Command="node  ContinueOnError="false" />
   <!-- it is, so have npm install all dependencies -->
   <Exec WorkingDirectory="$(ProjectDir)" Command="npm install" ContinueOnError="false" />
   <!-- npm installed bower for us, so now let bower install it's dependencies -->
   <Exec WorkingDirectory="$(ProjectDir)" Command="node_modules\.bin\bower install" ContinueOnError="false" />
   <!-- run the gulp task for the appropriate configuration -->
   <Exec WorkingDirectory="$(ProjectDir)" Command="node_modules\.bin\gulp $(Configuration)" ContinueOnError="false" />
 </Target>

@JacobAtchley
Copy link

@dracan i did not have to do anything in the npm install task in VSTS. the only thing i changed in the task was my working folder to the root of my asp.net core app (where the .csproj and packages.json files are located)

@dracan
Copy link

dracan commented Mar 24, 2017

I didn't have any luck getting that to work, so I tried recreating my project and copying my own code files back in, and it worked fine. I had previously created it a while back using the Yeoman tooling. This time I created it using the dotnet cli. I didn't need the additional VSTS build steps in this case either.

@JohnGalt1717
Copy link

JohnGalt1717 commented Mar 28, 2017

I'm using the HOSTED VS2017 build agent and the asp.net core preview still fails with:

C:\Program Files\dotnet\dotnet.exe restore C:\a\1\s\Blogs.csproj
C:\a\1\s\Blogs.csproj : error MSB4057: The target "Restore" does not exist in the project.

And if you add a command to get the dotnet.exe version it is still coming up as 1.0.0-preview3-004056 instead of final.

Everything works perfectly locally with the production versions of dotnet.

I tried the dotnet-install.ps1 script but it can't find the version that was just extracted in a Powershell execution step so I'm still stuck.

And I'm completely at a loss as to how this wasn't coordinated with the release of VS.net 2017 final and we're at almost a month now and this STILL isn't working reliably for everyone. BAD planning by people at MS.

@bryanmacfarlane bryanmacfarlane modified the milestone: TFS.vNext (onPrem) Mar 29, 2017
@bryanmacfarlane
Copy link
Contributor

Closing this since TFS2017 queue is available with the tooling. This is not an issue that will stay open to track any issue folks might have with building net core projects. Open separate issues for specific issues.

@JohnGalt1717
Copy link

This is still an issue. Our Hosted2017 agent has an outdated version of dotnet core (dotnet.exe) on it that prevents dotnet restore/build/publish from functioning on release versions of VS.net 2017 and similar and it still hasn't been addressed now pushing a month from release of VS.net 2017 when this should have been timed with the release in the first place.

@bryanmacfarlane
Copy link
Contributor

The image has the released VS2017 and it's tools. It has dotnet 1.0.0. Here's my output from a simple build running dotnet --version against the hosted vs2017 queue

2017-03-22T17:51:54.9286497Z ##[section]Starting: dotnet --version
2017-03-22T17:51:54.9306495Z ==============================================================================
2017-03-22T17:51:54.9306495Z Task         : .NET Core (PREVIEW)
2017-03-22T17:51:54.9306495Z Description  : Build, test and publish using dotnet core command-line.
2017-03-22T17:51:54.9306495Z Version      : 0.4.1
2017-03-22T17:51:54.9306495Z Author       : Microsoft Corporation
2017-03-22T17:51:54.9306495Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2017-03-22T17:51:54.9306495Z ==============================================================================
2017-03-22T17:51:55.9234330Z [command]C:\Program Files\dotnet\dotnet.exe --version
2017-03-22T17:51:56.0105221Z 1.0.0
2017-03-22T17:51:56.0215334Z ##[section]Finishing: dotnet --version

If you're not seeing that, then open a separate issue and we'll help you track your specific issue down.

We've confirmed with most the folks on this thread that it's working for them. As I said above, let's take the outliers on a case by case basic with specific logged issues. That benefits the OSS community as they get more targeted symptom searches and resolutions as opposed to reading through one long thread with multiple issues intertwined.

@slamotte
Copy link

Respectfully @JohnGalt1717 , I'd open a new ticket for your issue. Could be something specific to your account/settings? It sounds like this is working for most people. Best of luck!

@JohnGalt1717
Copy link

#3898 created.

@michaelbowman1024-zz
Copy link

Wanted to report that our VS2017 host is working as expected. Thanks for the efforts. Perhaps it could be shared with those who plan that this work would be better suited as finished on the date of release.

@ace26
Copy link

ace26 commented May 24, 2017

It is May and I ran into the same issue when my default queue was set to "Hosted". The build kept on failing with the error message:

2017-05-24T16:04:43.8388172Z error: Invalid input 'd:\a\1\s****.csproj'. The file type was not recognized.

However, as @hallatore suggested, I switched the default queue to "HostedVS2017" and that did the magic.

@bryanmacfarlane
Copy link
Contributor

@ace26 - yes, that is the solution. Select the vs2017 queue which selects a vs2017 machine which supports net core csproj

@microsoft microsoft locked and limited conversation to collaborators May 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests