aspnet / Announcements

Subscribe to this repo to be notified about major changes in ASP.NET Core and Entity Framework Core
Other
1.66k stars 80 forks source link

*.kproj renamed to *.xproj, and file content changes for targets/props #1

Open Eilon opened 9 years ago

Eilon commented 9 years ago

The VS project file *.kproj was renamed to *.xproj.

An example of this change can be seen here: https://github.com/aspnet/Options/commit/28168db62760d633a9a8a3d5712a35ea456527a1

The contents of the xproj file have also changed slightly for the Props and targets filenames and folders:

Old:

<?xml version="1.0" encoding="utf-8"?>
<Project ...>
  ...
  <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
  ...
  <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

New:

<?xml version="1.0" encoding="utf-8"?>
<Project ...>
  ...
  <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
  ...
  <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

An example of this change can be seen here: https://github.com/aspnet/Options/commit/ebca4acfaab5f159ac251f5b580826000ebcc920

Tragetaschen commented 9 years ago

I have got my solution with the beta3-kproj project files and did not change anything compared to what VS created (basically since alpha3). What is your recommendation: git mv the kproj files or delete them and let VS create new ones?

davidfowl commented 9 years ago

Delete and let vs create new ones is the best approach

sayedihashimi commented 9 years ago

After you delete the .kproj files in Visual Studio you can use File -> Open Project and select the project.json file. The .xproj file will be created for that project, and dependent projects as well.

BillHiebert commented 9 years ago

You shouldn't have to do anything. When you open the project, VS will convert them to xproj files for you. I would do that as it will update source control correctly (history will show the files as renames).

Tragetaschen commented 9 years ago

Just a word of caution: When VS generates a new *.xproj file for an opened project.json, it's different from the one generated by File->New Project. For example, the root node contains __ToolsVersion__ instead of 14.0.

davidfowl commented 9 years ago

@BillHiebert sounds like a bug

BillHiebert commented 9 years ago

Yes. We'll need to fix that.