dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
34.59k stars 9.79k forks source link

Please provide pre-DNX feed for VS users until CPT7 is released #377

Closed cherrydev closed 9 years ago

cherrydev commented 9 years ago

So, related to #368, I'd like to request that a feed be made available that would only contain the packages up until the dnx changeover was done, so those of us who use Visual Studio can continue to work with aspnet5 until CPT7 is released. This is analogous to the separate aspnetvnext/aspnetmaster feeds, except once created, nobody would have to touch or maintain them. At the very, very, very least, could you please provide us with a document that contains the version numbers of each of the packages before the change-over so that we can manually set them in our project.json files?

davidfowl commented 9 years ago

Safe Packages before the Rename

Runtimes

XRE (1.0.0-beta4-11203)

Entity Framework

Kestrel

Security

CORS

DataProtection

Diagnostics

FileSystem

Hosting

HttpAstractions

Identity

IIS

MVC

Razor

Routing

Session

SignalR

StaticFiles

Testing

WebSockets

WebSocketAbstractions

Common

Cache

Scaffolding

Configuration

DependencyInjection

Logging

Options

WebListener

CLR

cherrydev commented 9 years ago

Fantastic, thank you. Any chance we might see a myget feed for this?

davidfowl commented 9 years ago

Slim chance :smile:. But you could make a feed by restoring a set of packages to a local folder and then using that folder as a package source.

swaggerloaf commented 9 years ago

you can run app from command line still with small change to project.json and run with dnx see https://github.com/swaggerloaf/NeoSample-ASPNET5 for example Use a text editor like brackets until next VS

"frameworks": {
        "dnx451": { },
        "dnxcore50": { }
    },
developer1998 commented 9 years ago

I know that the framework is going through series of renames, configurations changes, etc... At some point I think VS has to completely break off with the old structure, like nothing was there before, and start afresh. This way everything should be in the correct place.

cherrydev commented 9 years ago

I'm just surprised to realize that the aspnet5 development team must not use Visual Studio at all and therefore I'm curious to know what a typical development setup for them must be. I tried out one of the "recommended" alternatives, Atom+OmniSharp, but I had no luck getting that working with DNX. Until this issue, I had been following the daily builds (beta4-*) and only having the occasional problem (API changes, k runtime needs updating), but after getting burned by this, I'm going to have to stick to specific version numbers and probably only update when I need specific fixes/changes or when a new VS CPT is released. It sounds like I may be one of the only people who have been following the daily builds while also trying to use Visual Studio, since I haven't really heard many other people speak up about this and I suppose that must have been foolhardy. It doesn't seem like the aspnet5 development team needs people using VS to be submitting issue reports or working with the dailies, so they must have enough people either working internally with it, or have enough external people using alternative development environments. Oh well, lesson learned.

RickyLin commented 9 years ago

I have waited for a long time for CTP 6 to support ".k" folder and eventually CTP 6 came, I was so happy that I didn't need to use a hacked way to make VS CTP5 work with .k folder any more. Then you guys renamed it again, so I have to continue my waiting again and try to find a hacked way again to make CTP6 work with .dnx folder. That's not fun, but I understand these are all because of "CTP" and "beta". Why can't VS team just give us an option to point out where VS can find out available runtimes?

davidfowl commented 9 years ago

@cherrydev We do use Visual Studio. We actually couldn't do any work for a few days and some team members were using sublime/a broken VS. We do use daily VS builds that are not public for good reasons (they are usually not ready for production). We dogfood those builds pretty aggressively for our daily dev.

Omnisharp hasn't been updated to support .dnx yet. I'm going to add that very soon.

Renames are a point in time thing. I know it's frustrating and we fail the pain ourselves but it's not permanent.

I want to make it clear that while we generally don't like breaking people, this is a brand new stack and while we have this opportunity to, we will opt to "get things as right as we can" because there's no way we're going to keep compatibility between prerelease versions of a pre 1.0 stack.

That said, we're getting more and more stable with each release and there won't be anymore renames.

cherrydev commented 9 years ago

@davidfowl Thanks for your personal response to this. It's good to hear that you have your own dogfood situation, but am a bit surprised there wasn't a minor revolt over there over this rename not being handled more elegantly or in a more coordinated manner, since there sure must have been a heck of a lot of people's time wasted in dealing with this. I'm not looking for a "production-ready" Visual Studio release! If I was, I wouldn't be using bleeding-edge aspnet5 (sorry, DNX) builds! I hope something gets pushed down the pipe soon for VS and I'm glad to know that there will not be any more renames.

Eilon commented 9 years ago

Hi @cherrydev I'm the dev manager for the project and would love to hear from you on how we could have done this better. Please feel free to email me at elipton -AT- microsoft -DOT- com with any thoughts.

BTW we had a meeting today to talk about how we could do some things better, and one of the ideas was to have some sort of "feed" where major changes could be announced. So for example if we had some feed that people such as yourselves could subscribe to, you would be the first to know about major changes and could participate in the discussion around it. I'm curious what your thoughts are on having something like that.

anfomin commented 9 years ago

@cherrydev @RickyLin @developer1998 I've recompiled VS ProjectK tools for new DNX names. You can download package here: https://www.dropbox.com/s/qhm2tf0kxqzo7v2/vs-dnx-support.zip?dl=0

To install just make 3 actions:

  1. Close VS2015.
  2. Unzip & run install.ps1 using administrator privileges.
  3. Run VS. Go to menu "Tools > Extensions" and upgrade NuGet to the latest version.

Then you can use dnx451/dnxcore50 as framework target. I've found that VS publish tools is not working correct with my assemblies. I use command line publishing until CTP7 / RC.

Power shell scripts makes next:

  1. Renames existing assemblies and .k directory adding .bkp extension. If something goes wrong you can always revert changes.
  2. Copies new assemblies.
  3. Adds strong name verification for 2 assemblies to ignore list (because I don't have private key).
  4. Installs DNVM and upgrades to the latest DNX.
RickyLin commented 9 years ago

thank you @anfomin . I will try it out when I get a chance.

cherrydev commented 9 years ago

Let me know how that goes, please! :-) I'm feeling a little bit gun-shy…

RickyLin commented 9 years ago

@cherrydev, it works.There are several trivial errors from dnvm, but I believe that's because I don't know how to run powershell scripts properly or kind of "file path" issue. The most important steps 1,2,3 work well. After upgrading the dnx, I rebooted my virtual machine then "Use specific KRE version" can read dnx from .dnx folder.

Anyway, I think all these stuff including CTP 6 might mess up your system more or less, so I propose to try them out in a virtual machine. I have one Windows 8 VM, two Windows 10 VMs, one Windows 7 VM, one Ubuntu VM and one OS X VM :stuck_out_tongue:

rajajhansi commented 9 years ago

.NET developers are used to Visual Studio. In the past VS used to be tied to versions of .NET and gotten better with vs2012, 2013 releases. I don't get why would an IDE be tied to a version of a runtime or framework? I'm a MS fanboy but it really hurts to see WebStorm and Eclipse doing a much better job handling versions of Java/JVM/JRE much better than how VS handles versions of .NET and the new .NET core.

Any new release of KRE or the now renamed DNX should readily be usable from VS 2015 CTP6. Releasing another CTP just to support runtimes does not look like a good strategy.

@anfomin, you are a rock star and thank you for the download package.

davidfowl commented 9 years ago

@rajajhansi it's not about version its like nodejs changing the name of their product. All of the tools that did anything with node would break.

Hopefully people understand by now why it breaks the way it does.

rajajhansi commented 9 years ago

@davidfowl isn't the IDE a fancy GUI on top of the command line tools (be it csc.exe or any other exe)? For e.g., the new task runners are fancy GUI wrappers on the command line tools that watch for change in files. Like I said in my comment, I'm a MS fanboy and will patiently wait for next CTP :) For now, I'm using @anfomin 's workaround.

On another note, I'm porting an existing .NET 4.5.x project using MVC, WebAPI, Asp.NET Identity to ASP.NET 5 and noticing lots of breaking changes, which I'm patiently fixing or finding workarounds. I totally understand that it is a pre-release version. If possible, please update: http://blogs.msdn.com/b/webdev/archive/2014/11/14/katana-asp-net-5-and-bridging-the-gap.aspx because it is hard to find workarounds for: IAppBuilder.CreatePerOwinContext() and missing interfaces like IIdentityMessageProvider (not a big deal to define this interface and implement Email & SmsProvider). Would you recommend posting these questions in the appropriate asp.net github repositories?

mkosieradzki commented 9 years ago

@rajajhansi No it is definitely not. Please have a peak on Roslyn you will see what's going on under the hood in VS.

Roslyn (open sourced and redesigned backed for VS) for example does INCREMENTAL compilation acting accordingly to every single character typed in the IDE. If you would had ran csc after every character typed you would have probably ended up with NetBeans-like or even worse UX.

BrettBaggott commented 9 years ago

@davidfowl @Eilon - I feel some of @cherrydev 's frustration too. I was plugging along on CTP6 when this rename caught me off guard. Then I tried to go down the /Ominsharp route and found that was broke too. But let me say this, I applaud the bravery with which you guys try to better the product. The things y'all are working on to bring us the "thing" that will be the best it can be... TOTALLY worth the inconvenience. Furthermore, choosing NOT to sacrifice the end product in order to make the best product, very commendable. I'm sure it wasn't inconsequential to drop EDMX support in EF7. I'm sure it wasn't inconsequential to drop VB... but those changes allowed y'all to focus on the right stuff. Do I like y'all moving my cheese? Nope. But are y'all "doing the right thing"... YES, YES, and YES. Please keep it up! (Disclaimer: there's no value for me in fanboying y'all or buttering you up, these are my actual opinions :))

EDIT: I realize you didn't "drop" VB. I should have said... umm, well, something different. You know what I mean.

vaualbus commented 9 years ago

I have run the script but now every time I try to make a vnext project I get an error saying: Object Reference not se to an instance of an object and the project not create. I have only the src folder show in the solution explorer with no file in it. And in the project folder I get only project folder name created

rajajhansi commented 9 years ago

@mkosieradzki, You are right about Roslyn, incremental compilation, VS IDE leveraging Roslyn etc. All I meant was don't we have global.json that allow us specify the sdk version: "sdk": { "version": "1.0.0-beta3" } and the "Application" tab under Project Properties where we can select the KRE version?? If I change the version from 1.0.0-beta3 to 1.0.0-beta4, can't the IDE load the new SDK and can it not smartly pickup the runtimes under %userprofile%.dnx\runtimes folder and list them in Project properties? I understand VS IDE is not open source but it can learn from other IDEs (I don't consider NetBean as an IDE). What about the name changes? K was a code name which is replaced with dn*. Why leave out kpm instead of calling it dnpm or better yet let us use nuget directly? Look at EF (code first, model first, database first) and now all of them are last (or lost) and codefirst is the way to go with migrations. Windows phone is awesome but the number of apps is never going to come closer to Apple. Why? However sucky ObjectiveC was, they stuck to it (Swift is very new). What did MS do? First they hyped about Silverlight, ditched it and then asked developers to write apps in XAML/C#, C++ (seriously), JavaScript. I'm not trying to nitpick but MS is really testing the patience of their supporters and pushing them away to NodeJs. Inspite of all the frustrations, I'll continue to use Microsoft technologies.

egorpavlikhin commented 9 years ago

@anfomin, do you have the original dlls? Your script broke VS completely :)

Unable to cast object of type 'System.Reflection.RuntimeMethodInfo' to type 'System.Reflection.ConstructorInfo'.

anfomin commented 9 years ago

@egorpavlikhin my script does not delete original dlls. It renames them into .bkp files.

Unable to cast object of type 'System.Reflection.RuntimeMethodInfo' to type 'System.Reflection.ConstructorInfo'.

You should upgrade NuGet to the latest version via "Tools => Extensions and updates" menu. This will resolve this exception.

anfomin commented 9 years ago

@egorpavlikhin also check if assemblies are in strong name verification ignore list. Run this command in Developer Command prompt:

sn -Vl

There must be 2 assemblies, like: 2015-03-23 21 41 33

egorpavlikhin commented 9 years ago

@anfomin complete reinstall of nuget helped :+1:

cherrydev commented 9 years ago

@Eilon I still haven't heard back from you. I e-mailed you on March 13th and I'm eager to hear your response. Thanks!

Eilon commented 9 years ago

@cherrydev working on a response right now, sorry for the delay! I actually left for an 8-day vacation just a few hours after you sent the email, and just got back two days ago... still catching up on a few hundred emails and GitHub threads :smile:

cherrydev commented 9 years ago

It appears that at least some of the old versions of the packages listed above that still work with CPT6 are no longer in the feeds. At this point, anybody still using Visual Studio CPT6 that does not have the cached versions of the old packages are absolutely, 100%, dead in the water.

aggieben commented 9 years ago

It looks like these packages are no longer available on the dev feed on myget.org. Are they available anywhere else?

Eilon commented 9 years ago

The MyGet feeds have a package retention of 20 packages per ID, so old packages do get cleared out unfortunately. Let me see if I can put up a feed that has all the safe packages (we have private copies of them here).

Eilon commented 9 years ago

I created a new MyGet feed with the latest KRE-based packages (i.e. pre-DNX): https://www.myget.org/F/aspnetlastkre/

We won't hold onto this feed forever, of course, but I'll keep it up probably until at least RTM so people have a chance to update to DNX (including upgrading to VS previews that have DNX support).

Please let me know if you have any issues with the packages on this feed.

Thanks again for your patience on this!

cherrydev commented 9 years ago

Any chance we might see a myget feed for this?

@davidfowl : Slim chance

:-P

Eilon commented 9 years ago

Slim != 0 :smile:

davidfowl commented 9 years ago

I was gonna say that :smile:

ghost commented 9 years ago

@anfomin , i run script. But on project loading i got

C:\Users\user\Downloads\Logging-dev\Logging-dev\src\Microsoft.Framework.Logging.TraceSource\Microsoft.Framework.Logging.TraceSource.xproj : error  : Value cannot be null.
Parameter name: projectMoniker

What to do?


And what is project.lock.json ? is csproj merge-hell comming back?

anfomin commented 9 years ago

@ggrnd0 my script doesn't adds xproj project type support. For your solutions just use current kproj type, VS2015 CTP6 will create it by default. If you want to open existing xproj, open project.json as project (not as file).

You can read about project.lock.json here: https://github.com/aspnet/Home/wiki/Lock-file:-project.lock.json

ghost commented 9 years ago

@anfomin , thanks.

Nuget still send targetPlatform=aspnet50aspnetcore50 How to change to "dnxcore50"? nuget updated

anfomin commented 9 years ago

@ggrnd0 you should use latest dev feed: https://www.myget.org/gallery/aspnetvnext

ghost commented 9 years ago

@anfomin , i forgot to replace aspnet50/aspnetcore50 in project.json...

Also i setup environment variable %KRE_HOME% to "C:\Users\user.dnx", otherwise vs2015 cannot found clr...

Boglen commented 9 years ago

@anfomin, Thank you for your solution. After installing your assemblies had to reinstall nuget. And after removing nuget vs crashed. Turn off the Internet and installed from a package. About the publish tool, simply make a copy of the dnu.cmd and rename it to the kpm.cmd and all work fine.

ghost commented 9 years ago

Also i have got trouble: package restoring in VS2015 too slow after update to dnx... I do not understand 'what is it'...

Have someone got it too?

anfomin commented 9 years ago

@Boglen I know about renaming dnu.cmd to kpm.cmd but it does not enable all features. When publish dialog is opened you can't select DNX version, you can only use default one. I've tried to replace publish VS extension but when I did it "publish" menu disappeared :smile:. So I decided not to touch this assembly...

developer1998 commented 9 years ago

I think CTP7 is just around the corner, just checked and CTP6 was released more than one month ago.

ghost commented 9 years ago

@developer1998, are you optimist? 3 weeks have gone and CTP7 still around the corner...

Eilon commented 9 years ago

There is another VS preview coming, but unfortunately we can't disclose the date here.

In the meantime if you're looking for a dev tool experience that supports DNX, I know people have been successful using OmniSharp.

aggieben commented 9 years ago

Thanks, @Eilon !

developer1998 commented 9 years ago

@ggrnd0 I am absolutely thrilled about .NET 5. I don't remember last time I was excited this much about any programming technologies. I like that it is written from ground up, like the open source, like this community. Fact that @Eilon says another preview is coming, I think around the corner might be almost here:)

ghost commented 9 years ago

I wait it too.

wizarrc commented 9 years ago

@anfomin I got your script to work the second time around. The first time I installed a Win 10 9926 Generation 2 VM on a win 8.1 pro machine using hyper-v. Installed VS 2015 CTP6 and hit a snapshot. I copied over my project source files, upgraded nuget, made sure everything loaded okay, then I ran your script as admin. I got an Invalid Operation error. So I uninstalled nuget, went to the website, downloaded the new one and installed it. After that, my error was "error : Value cannot be null. Parameter name: projectMoniker". Even uninstalling and replacing the .dlls from your script didn't help, not with several reboots. Nothing would work!

2nd time around, I reverted my VM snapshot from after installing visual studio and ran your script as admin again, this time I did NOT open any projects first, and upgraded nuget. I copied over my project source files again and they opened right up. Mind you I had to change a few things around in the project.json file, etc but no more value cannot be null error!

I would imagine there is some dll caching going on. No mater what I did I could not get rid of that error message once I got it.

ghost commented 9 years ago

@wizarrc, as @anfomin already told:

@ggrnd0 my script doesn't adds xproj project type support. 
For your solutions just use current kproj type, VS2015 CTP6 will create it by default.
If you want to open existing xproj, open project.json as project (not as file).

as temp solution you can rename all *.xproj to *.kproj and replace it in *.sln - it will work fine!

In git-bash

find . -type f -name *.xproj | while read x; do mv $x ${x/xproj/kproj} ; done;
find . -type f -name *.sln | while read s; do sed -i -e 's/xproj/kproj/g' $s ; done;