-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Comments
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. |
@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? |
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. |
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 :) |
hi @sachinma any ETA for building core on vsts (hosted build)? will it be available when vs2017 RTMs early march? |
It would be great if VSTS kept up more closely with .net core... right now, we re a bit stuck without any real timeline. |
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. |
Why is this marked as closed though? It's clearly not fixed yet. |
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. |
VS 2017 released and still not working |
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? |
Is there a plan when the new (and now Released) Csproj Format Support will be there for Hosted Agents? |
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.. |
I am having the same problem 2017-03-08T00:31:16.8747494Z ##[section]Starting: Restore |
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." |
That is clearly not out yet. |
still not working :( |
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... |
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... |
+1 |
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? |
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. |
Thank you for your quick response. I will give it another shot later on today and provide feedback |
@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? |
@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. |
I'm happy to report that my .NET Core (Preview) build steps work correctly now. |
@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. |
I think I ran into this bug. Switching to nuget 3.3 allowed packages to restore. |
@awcab you can also just run dotnet restore. In addition NuGet 4 will be rolling out starting next week. |
Ah, thanks @chrisrpatterson ! I didn't think about that. Still getting used to the new core tools. |
I got this errror: 2017-03-21T18:52:33.6424886Z anyone can help-me ? |
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. |
@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. |
@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
|
I also had an issue with including dotnet core web jobs into the project.
|
tested and working. much easier now :) thanks |
@JacobAtchley Thanks for that info. I've tried what you described, but I get the following error in the bower install task ...
Did you have to do anything additional to set that PATH? |
@dracan Since node is included with visual studio, you can bootstrap the whole install like this:
|
@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) |
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. |
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 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. |
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. |
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. |
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. |
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! |
#3898 created. |
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. |
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:
However, as @hallatore suggested, I switched the default queue to "HostedVS2017" and that did the magic. |
@ace26 - yes, that is the solution. Select the vs2017 queue which selects a vs2017 machine which supports net core csproj |
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:The text was updated successfully, but these errors were encountered: