Windows 8 – The project targets ‘.NetFramework’ while the file reference targets ‘.NetCore’.

As part of Windows 8 Application development, we came across the following exception “A reference to ‘x’ could not be added. The project targets ‘.NetFramework’ while the file reference targets ‘.NetCore’. This is not a supported scenario”

In our project, we created a Metro style class library and try to add it to the WCF Service library created. Here the Metry Style Class library targeted to .NetCore and the WCF Service library targeted to .NetFramework.

Same in the case of adding a reference of .Net class library to a Metro application. A Metro style app must use references to another .NETCore or Portable Library binary only and it cannot reference a full .NET 4.0 libraries because the Metro profile is not that large (and would fail store certification).

We can create the “.NETCOre” library using  the Class Library project under the Metro style apps category in Visual Studio

Advertisements

About ambilykk

I am a Technology Evangelist on Microsoft Technologies. I am carrying the passion on Microsoft technologies specifically on web technologies such as ASP .Net and Ajax. My interests also include Azure and Visual Studio. Technology adoption and learning is my key strength and technology sharing is my passion.
This entry was posted in Windows 8 App and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s