Skip to main content

Converting an XBAP to a WPF application

After starting out on the XBAP route and quickly hitting the sandbox limit it was time to actually move to an application paradigm that would support file access as well as database interaction. So I decided I had to convert the XBAP to a plain old WPF application.

I added a new Window1.xaml file and reconfigured the start url in the App.xaml file to point to the newly added file.

After messing around with  the property sheet for the solution, I proceeded to compile the solution and  instead ended up with the following error message.

11-01-2009 17-42-40

There was not an option to change the setting until I poked in the *.csproj( the project definition file) file which contained the relevant xml nodes <IsWebBootstrapper>, <HostInBrowser> and <TargetZone>. Delete these nodes and F5 the project.

<PropertyGroup>
<
Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<
Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<
SchemaVersion>2.0</SchemaVersion>
<
ProjectGuid>{DDA5DF2A-BCAF-4B2E-9A86-7E7F5F8292C7}</ProjectGuid>
<
OutputType>WinExe</OutputType>
<
AppDesignerFolder>Properties</AppDesignerFolder>
<
RootNamespace>CharityWorkSpace.Zainco.YCW.CRM</RootNamespace>
<
AssemblyName>CharityWorkSpace.YCW</AssemblyName>
<
TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<
FileAlignment>512</FileAlignment>
<
ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<
WarningLevel>4</WarningLevel>
<
EnableSecurityDebugging>true</EnableSecurityDebugging>
<
StartAction>URL</StartAction>
<
HostInBrowser>true</HostInBrowser>
<
TargetZone>Internet</TargetZone>
<
GenerateManifests>false</GenerateManifests>
<
SignManifests>false</SignManifests>
<
ManifestKeyFile>Records Management_TemporaryKey.pfx</ManifestKeyFile>
<
ManifestCertificateThumbprint>3327D64CAF3D6C7423AD45AC8121C526DB8AB168</ManifestCertificateThumbprint>
<
IsWebBootstrapper>true</IsWebBootstrapper>

Comments

Popular posts from this blog

Internal Rate of Return(IRR) Using Newton-Raphson in C#

This little excursion in numerical analysis was prompted by the rather flaky IRR Excel function available in Microsofts' Excel API. We were building a bond quotation engine and part of the actuarial calculations required the determination of the internal rate of return for a given list of cashflows.

I am an ardent advocate of software reuse, but when faced with APIs that are not extensible, the options are: Google for an alternative implementation; build a custom component or defenestration.

I explored the first option, but the solutions available did not integrate with the clients' target platform. A webservices facade was not an option either - think technical debt and the "my Java is better than your Java" type arguments. I am saving the more drastic option for an apt occasion.

The IRR function is essentially a polynomial function in r whose solution is any value of r that makes the function equal to zero. A more detailed description is available here.

Formally IRR ca…

Using the SQLiteConnectionStringBuilder in C#

This solution resolved my SQLite connection string configuration. The code makes use of the SQLiteConnectionStringBuilder class. The database filepath is shown here, but must reside in a configuration file for easy management.

get
{
string dbFilePath = @"C:\Program Files\SQLLite\TimesheetManager.db";
SQLiteConnectionStringBuilder bldr = new SQLiteConnectionStringBuilder();
bldr.DataSource = dbFilePath;
return bldr.ConnectionString;
}