Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Windows 10 For Developers 4 of N: Upgrading to Visual Studio 2015RC
WhatsApp
Josue Yeray Julian Ferreiro
5y
9.3k
0
1
100
Article
Introduction
Here it is. After some weeks full of news with the //Build 2015 and Ignite 2015 conferences, it is time to start again talking about all the new things Windows 10 can bring to us, developers.
But first, let's see the other articles in the series so you can have a look at them.
Windows 10 for developers 1 of N: An introduction
Windows 10 for developers 2 of N: adaptative UIs
Windows 10 for developers 3 of N: New controls
Windows 10 for developers 4 of N: Visual Studio 2015 RC
This, the fourth article in the series will help you transition from Visual Studio CTPX to Visual Studio 2015 RC. Every time you work with pre-release software you are exposed to some breaking changes that can occur between versions. This is the case of the transition to Visual Studio 2015 Release Candidate. The old Windows universal projects created with CTP versions will not load. If you try to open an old project in Visual Studio 2015 RC, the IDE will say you need an update to load the project.
This is a bit confusing, a newer IDE version needs an update to open an older project? No, in fact not. The problem is the UAP (Universal App Platform) version of the project (10.0.10030.0) is not the same as the one supported now (10.0.10069.0) so Visual Studio thinks you are trying to open a newer one. Simply click OK.
The project will show in the Solution Explorer as "Update required". Right-click on the project name and select "Edit projectname.csproj" from the context menu. This will open the csproj file in XML format. Find the nodes "TargetPlatformVersion" and "TargetPlatformMinVersion". They will have a value different than 10.0.10069.0, change their value for the newer one 10.0.10069.0.
Save the changes, close the file and right-click again over the unloaded project, select "Reload nameoftheproject" from the context menu. This time the project will load fine and you should see your project completely.
But if you try to compile, multiple errors occur. The problem is, some insights references included by default has been updated and changed, so you need to manually do it. Right-click on your project References node and select "Manage NuGet packages" from the context menu. In the NuGet manager, be sure to filter by "Upgrade available" and to have checked "Include pre-release".
One of the results will be "Microsoft.ApplicationInsights". Select it and click Upgrade in the button at the right. Now in the Filter dropdown select "All" again and search for the following packages.
Microsoft.ApplicationInsights.PersistanceChannel
Microsoft.ApplicationInsights.WindowsApps
Add both packages to your project.
You very nearly have your project working again. You need to update the applicationinsights.config file in your project with the new modules and configuration. The easy way to do this is simply open a new project and copy the content of the file to yours, or copy it from here.
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<ApplicationInsights xmlns=
"http://schemas.microsoft.com/ApplicationInsights/2013/Settings"
>
<TelemetryModules>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights"
/>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.Windows.SessionTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows"
/>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.Windows.PageViewTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows"
/>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.Windows.UnhandledExceptionTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows"
/>
</TelemetryModules>
<TelemetryChannel Type=
"Microsoft.ApplicationInsights.Channel.PersistenceChannel, Microsoft.ApplicationInsights.PersistenceChannel"
/>
<ContextInitializers>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.ComponentContextInitializer, Microsoft.ApplicationInsights"
/>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.DeviceContextInitializer, Microsoft.ApplicationInsights"
/>
</ContextInitializers>
<TelemetryInitializers>
<Add Type=
"Microsoft.ApplicationInsights.Extensibility.Windows.UserContextInitializer, Microsoft.ApplicationInsights.Extensibility.Windows"
/>
</TelemetryInitializers>
</ApplicationInsights>
Unless you have some specific configuration, this will work for you.
At this point, your solution will compile and run without problems. But there will be two warnings about the temporary certificate of the app not being valid. There is no way to generate a new one (since the current version of the tools doesn't include the visual editor for appxmanifest) but you shouldn't have problems running your app, even if you delete the certificate.
And that's all! I used this method to upgrade
all this series samples
and all works perfectly now in Windows 10 10074 build and Visual Studio 2015 RC.
Soon we continue with more features of Windows 10,
Summary
In this article, we learned about Windows 10 For Developers 4 of N: Upgrading to Visual Studio 2015RC.
uap
upgrade projects from CTP6 to RC
uwp
visual studio
windows 10
Up Next
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
DevsDNA
Development, training and mentoring company focused on Mobile and Augmented reality
Membership not found