Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
franckster
Frequent Visitor

Visual Studio (Code & 2017 Community) .NETFramework error

Hi all,
I'm reaching out because I'm bumping into a problem that prevents me to try out all the PowerBI sample applications in either VS Code or VS 2017 Community.
I'm totally new to the .NET / C# Windows world as I've developped on the RoR Stack on Ubuntu so far.
When I try and run code like the App Owns Data sample, I get the following error in the console :
d:\Code\Embed-API-Sample\EmbedAPISample\EmbedAPISample.csproj : error NU1202: Package Microsoft.PowerBI.Api 2.0.11 is not compatible with net40 (.NETFramework,Version=v4.0). Package Microsoft.PowerBI.Api 2.0.11 supports: portable-net45+win8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile111)
d:\Code\Embed-API-Sample\EmbedAPISample\EmbedAPISample.csproj : error NU1202: Package Microsoft.Rest.ClientRuntime 2.0.1 is not compatible with net40 (.NETFramework,Version=v4.0). Package Microsoft.Rest.ClientRuntime 2.0.1 supports:
d:\Code\Embed-API-Sample\EmbedAPISample\EmbedAPISample.csproj : error NU1202: - dnxcore50 (DNXCore,Version=v5.0)
d:\Code\Embed-API-Sample\EmbedAPISample\EmbedAPISample.csproj : error NU1202: - net45 (.NETFramework,Version=v4.5)
d:\Code\Embed-API-Sample\EmbedAPISample\EmbedAPISample.csproj : error NU1202: - portable-net45+win8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile111)

It looks like the .NET 4.0 Framework is referenced somewhere but I can't find where. And it's not installed on my PC as I went for the 4.7.1 version on my Win10 Creators' etc PC.

I'd really appreciate if anyone could help...

Thanks forward for any ressource you will direct me to,

Best,

Franck

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @franckster,

 

Here is an article about troubleshooting .NET Framework Targeting Errors. Could you go to check if it helps in your scenario? Smiley Happy

 

Regards

Thanks for your answer!

I had the PBI support over the phone on Friday and the build went fine on VS Community 2017 when we downloaded again the source code from Github. So I assume opening the project in VS Code first kind of messed it up...

I'll look into it anyway as it really bugs me not be be able to use VS Code for this...

Thanks again !

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.