I recently updated my computer to have Visual Studio 2015 Update 2 and the anniversary sdk ctp for windows 10. I noticed I no longer was seeing any packages when I tried to add a nuget package. It turns out the url which goes at the top of the package locations was missing. Once I added it back everything worked fine.
Wednesday, April 6, 2016
Sunday, April 3, 2016
FreshMVVM getting started the missing step
I have been playing around with FreshMVVM and found I like it a lot. It is very light weight and fairly easy to use.
There is one thing missing from the FreshMVVM quick start that I felt should blog about. You need to put everything in a fresh navigation container if you want the pages and page models to resolve and of course be able to navigate.
http://www.michaelridland.com/xamarin/freshmvvm-quick-start-guide/
In the app class this is how you need to set MainPage to an instance to show the first page.
There is one thing missing from the FreshMVVM quick start that I felt should blog about. You need to put everything in a fresh navigation container if you want the pages and page models to resolve and of course be able to navigate.
http://www.michaelridland.com/xamarin/freshmvvm-quick-start-guide/
In the app class this is how you need to set MainPage to an instance to show the first page.
public App()
{
// The root page of your application
var homePage = FreshMvvm.FreshPageModelResolver.ResolvePageModel<HomePageModel>();
var navConatiner = new FreshMvvm.FreshNavigationContainer(homePage);
MainPage = navConatiner;
}
Monday, December 28, 2015
Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file
I received this error while building a UWP app.
Could not locate xxxx\packages.config. Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file.
I did check and see the package.config in the right directory and I did have Microsoft.BCL.Build. The only way to get this to work is to close visual studio delete the obj folder in the solutions directory. Once the obj folder is deleted and I reloaded the project in visual studio everything worked again.
Could not locate xxxx\packages.config. Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file.
I did check and see the package.config in the right directory and I did have Microsoft.BCL.Build. The only way to get this to work is to close visual studio delete the obj folder in the solutions directory. Once the obj folder is deleted and I reloaded the project in visual studio everything worked again.
Thursday, December 3, 2015
Error : DEP1630 : Invalid "TargetOsVersion" property
I was trying to get the Wikipedia sample app for windows store 8 from GitHub to run in visual studio 2015. The app is a HTML app.
https://github.com/wikimedia/apps-win8-wikipedia
When trying to run the app I was getting the following error
DEP1630 : Invalid “TargetOsVersion” property
The solution was to edit the WikipediaMetroTest.jsproj with notepad and change the Visual studio version to 14.0
https://github.com/wikimedia/apps-win8-wikipedia
When trying to run the app I was getting the following error
DEP1630 : Invalid “TargetOsVersion” property
The solution was to edit the WikipediaMetroTest.jsproj with notepad and change the Visual studio version to 14.0
<VisualStudioVersion>14.0</VisualStudioVersion>
Saturday, November 7, 2015
Targeting Mobile only in a windows universal app
To make your UWP app only target windows 10 mobile add the following to your app manifest
https://msdn.microsoft.com/en-us/library/windows/apps/dn986903.aspx
<Dependencies>
<TargetDeviceFamily Name="Windows.Mobile" MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"/>
</Dependencies>
This MSDN article has more infohttps://msdn.microsoft.com/en-us/library/windows/apps/dn986903.aspx
Sunday, November 24, 2013
Windows Phone 8 submission Tip
Dont forget to set the icon for the live tiles in the application manifest. I failed submission for using the default icon in live tiles because I was setting it in code but did not do it in the manifest.
Saturday, June 1, 2013
Seeding a Lex.DB
Lex.DB is an object database that can be used in Windows Store and Windows Phone apps. This is a fast free alternative to SQLite.
To learn more about Lex.DB see Lex's blog
In my case I wanted to include a database that already had data in it with a windows phone 8 app I created.
List<AutoMobileInformation.AutoMobileCodes> lstComplete =
new List<AutoMobileInformation.AutoMobileCodes>(); using (var db = new DbInstance("auto codes")) { db.Map<AutoMobileInformation.AutoMobileCodes>().Automap(i => i.Id)
.WithIndex("Code", i => i.Code).WithIndex("Manufacture", i => i.Manufacture); db.Initialize(); lstComplete = db.LoadAll<AutoMobileInformation.AutoMobileCodes>().ToList(); if (lstComplete.Count == 0) { var lex = await ApplicationData.Current.LocalFolder.CreateFolderAsync("Lex.Db",
CreationCollisionOption.OpenIfExists); var auto = await lex.CreateFolderAsync("auto codes",
CreationCollisionOption.OpenIfExists); StorageFile seedFile1 = await StorageFile.GetFileFromPathAsync(
Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path,
@"AutoMobileCodes.index")); StorageFile seedFile2 = await StorageFile.GetFileFromPathAsync(
Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path,
@"AutoMobileCodes.data")); await seedFile1.CopyAsync(auto, @"AutoMobileCodes.index",
NameCollisionOption.ReplaceExisting); await seedFile2.CopyAsync(auto, @"AutoMobileCodes.data",
NameCollisionOption.ReplaceExisting);
}
}
In the code first we create an instance of the database. The we add an index to the database. Then we check and see if there is any data in the database.
If there is not I replace the Index and Data file in isolated storage with files that have data.
Subscribe to:
Posts (Atom)
-
First lets create a new Repository on GitHub . For this demo I created a public repository that has a readme, and a Visual Studio Git Igno...
-
If you have the Anniversary update windows 10 pro or greater you can enable long file names in group policy. Search for group policy edit...
-
I decided it would be better learn linux on an actual machine instead of a virtual machine. I looked at some of the linux laptop available...