This project is read-only.


Support for package that targets both Windows Store XAML and Windows Store HTML


Copy from a discussion. The gist of this feature is to allow package authors to distinguish between a C#/VB.NET Windows Store project versus a HTML/JS project (and preferably versus C++ project too), in the same package.

I'm trying to create a NuGet package that targets both Windows Store XAML/C# and Windows Store HTML/JS. The Windows Store XAML/C# DLLs can be placed inside of lib/NETCore45 (or now lib/Windows8) and they will install fine on to Windows Store XAML/C#
projects. However, when trying to install on a Windows Store HTML/JS project it says that the NuGet package does not support the project type.

My current work around is to place the Windows Store XAML/C# .DLLs and the Windows Store HTML/JS .js files in their own separate folders and then use tools\NETCore45\install.ps1 (or now tools\Windows8\install.ps1) to detect if the $project.Type is C# or
JavaScript and install the proper files to the project.

Is this the recommended approach? Is there already support for this scenario? Will this scenario be supported in the future?


Closed Nov 8, 2012 at 1:45 AM by ClayCompton
I can confirm the new profiles in the latest build of NuGet 2.2.


dotnetjunky wrote Oct 15, 2012 at 2:52 PM

We will add support for these 3 profiles to allow package authors to distinguish the three different flavors of Windows Store apps.

windows8-javascript (or win8-javascript or netcore45-javascript): apply to Windows Store JavaScript projects.

windows8-managed (or win8-managed or netcore45-managed): apply to Windows Store C# or VB projects.

windows8-native (or win8-native or netcore45-native): apply to Windows Store C++ projects. (However, since we’re not supporting C++ projects yet, this moniker is not applicable.)

To maintain backward compatibility, the current windows8 (and netcore45) moniker will continue to be compatible with all three project flavors.

If a package contains both windows8 and one of the above specific profiles, NuGet will pick the specific profile. For example, if a package contains both windows8 and windows8-managed, then when NuGet installs it into a C# Windows Store project, it will pick windows8-managed.

dotnetjunky wrote Oct 16, 2012 at 7:25 AM

Fixed in changeset ab1269aa836b

onovotny wrote Oct 30, 2012 at 9:28 PM

If we have a WinJS package, what if it has both WinMD components and DLL's? Only the DLL should be referenced directly....

dotnetjunky wrote Oct 30, 2012 at 10:12 PM

I believe you mean "only the WinMD components" should be referenced directly". In that case, you can you the filtered assembly references section in the metadata to restrict to WinMD files.