.net maui poject cannot archive/Publish due to app icon - c#

Following the changes as directed in Microsoft documentation, I made changes to my project as thus.
Android Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true"
android:icon="#mipmap/kigoo"
android:roundIcon="#mipmap/kigoo_round"
android:supportsRtl="true">
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<queries>
<intent>
<action android:name="android.intent.action.DIAL" />
<data android:scheme="tel"/>
</intent>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>
</manifest>
In the project.csprog
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg"
ForegroundFile="Resources\AppIcon\kigoo.svg" ForegroundScale="0.65" Color="#512BD4"
/>
I can deploy to the emulator and physical devices fine but...
Trying to the archive on debug mode (Just to get the errors), fails and does not show any error.
archiving in the release mode throws the following errors:
1.
Severity Code Description Project File Line Suppression State
Error APT2260 resource mipmap/kigoo_round (aka com.companyname.kigoopcmauisimple:mipmap/kigoo_round) not found. This error is likely caused by an issue with the AndroidManifest.xml file or an Android manifest generation attribute in a
source code file. KigooPCMauiSimple C:\Users{path} 1
Severity Code Description Project File Line Suppression State
Error APT2260 resource mipmap/kigoo (aka com.companyname.kigoopcmauisimple:mipmap/kigoo) not found. This error is likely caused by an issue with the AndroidManifest.xml file or an Android manifest generation attribute in a source code file. KigooPCMauiSimple
C:\Users{path} 1
Severity Code Description Project File Line Suppression State
Error APT2067 failed processing manifest. KigooPCMauiSimple C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Aapt2.targets 212
Please advise, I appreciate it.

I have tested it. You may need to make the following changes in the project.csprog:
<MauiIcon Include="Resources\AppIcon\kigoo.svg"
ForegroundFile="Resources\AppIcon\appicon.svg" ForegroundScale="0.65"
Color="#512BD4"/>
This is because in your Android Manifest file , you have set it like this:
android: icon="#mipmap/kigoo"
So in your project.csprog file, behind MauiIcon.Include attribute, it should also be set accordingly like this:
<MauiIcon Include="Resources\AppIcon\kigoo.svg"/>

Related

Xamarin forms app is requiring duplicate WRITE_EXTERNAL_STORAGE entries in AndroidManifest

I'm running into a very odd issue in my Xamarin Forms app. I am trying to take a picture in my app, then use OCR to read the text, but I'm struggling to get permissions to be granted for WRITE_EXTERNAL_STORAGE. I now have to declare WRITE_EXTERNAL_STORAGE twice in my AndroidManifest in order for the app to allow me to request storage permissions or to access storage, once as a self-closing tag and once with explicit tag:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
If either is removed (leaving just one version of WRITE_EXTERNAL_STORAGE), I get the following exception when trying to request permissions for external storage or when trying to capture a picture: "You need to declare using the permission: android.permission.WRITE_EXTERNAL_STORAGE in your AndroidManifest.xml"
This ONLY affects WRITE_EXTERNAL_STORAGE...all other declared permissions (using self-closing tags) in the manifest work appropriately. It's just the write storage permission that needs this "hack."
This issue occurs on emulated devices (debug mode) AND on physical devices (via Play Store alpha track) when only one instance of the permission is listed. When debugging with both lines in the manifest, the app is able to obtain permissions to storage successfully and I can take the picture as expected. The Play Store will not accept submissions with duplicate lines in the manifest, so I am unable to submit to the store using this "hack."
This is a full copy of my AndroidManifest (without PII), including the duplicate lines I have to include in order for storage permissions to be granted successfully when debugging:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="myapp" android:versionName="3.2.2" android:installLocation="auto" android:versionCode="59">
<application android:theme="#android:style/Theme.Material.Light" android:icon="#drawable/Icon120" android:label="MyApp">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/file_paths"></meta-data>
</provider>
</application>
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
</manifest>
I also have the following line in my AssemblyInfo.cs file:
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
When I try to request permissions via Xamarin.Essentials or to access the camera to tke a picture via Xamarin.Essentials or CrossMedia, the app blows up with the above exception, claiming I am missing the WRITE_EXTERNAL_STORAGE permission, despite it being in the manifest once (either self-closed or with explicit tag). Any of these lines executing will result in the exception and all lines work when both entries for WRITE_EXTERNAL_STORAGE are present:
var permissionStatus = await Xamarin.Essentials.Permissions.RequestAsync<Xamarin.Essentials.Permissions.StorageWrite>();
var photo = await Xamarin.Essentials.MediaPicker.CapturePhotoAsync(new Xamarin.Essentials.MediaPickerOptions { Title = DateTime.Now.ToString("G") + ".jpg" });
var file = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions { Name = DateTime.Now.ToString("G") + ".jpg" });
I have tried updating all of my NuGet packages and am now on the latest versions of frameworks for the app (Xamarin Forms v5 and Xamarin.Essentials 1.6.1) but this issue still persists. I also tried completely deleting the manifest and restarting from scratch, but the same "hack" is still needed.
Has anyone run into this or have any idea of how this can be fixed?
Thank you in advance!
To anyone who has this issue, the solution was to remove all references to and uninstall the NuGet package for HockeySDK.Xamarin. As soon as I removed everything related to this, the issue resolved itself and I no longer had the problem with the manifest

"Validation error. error C00CE014: App manifest validation error" when trying to create app packages for Windows Store

I'm struggling with this error for a few hours now. I can build and deploy the app without issues, it just won't create distributable packages (Project > Store > Create App Packages)
The problem is rather weird. Here's my Package.appxmanifest file:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3">
<Identity Name="481f1dca-fa19-4642-8e95-9208a4c9265f" Publisher="CN=mrrey" Version="1.1.8.0" />
<mp:PhoneIdentity PhoneProductId="06509575-8d8e-4beb-aa84-4ea390365781" PhonePublisherId="06509575-8d8e-4beb-aa84-4ea390365785" />
<Properties>
<DisplayName>XYZ MusicBox</DisplayName>
<PublisherDisplayName>mrrey</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="XYZ_MusicBox.App">
<uap:VisualElements DisplayName="XYZ MusicBox" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="XYZ MusicBox" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="musicLibrary" />
<uap3:Capability Name="backgroundMediaPlayback" />
<DeviceCapability Name="microphone" />
</Capabilities>
</Package>
This is the initial state of my manifest. After I click Create in the wizard, it starts building the packages. The output:
...
1> 1018 ms Csc 2 calls
1> 1091 ms ResolveAssemblyReference 1 calls
1> 3498 ms CompileXaml 2 calls
1> 3615 ms GenerateAppxManifest 1 calls
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:11.30
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Package: 0 succeeded, 1 failed ===========
========== App Bundle: 0 succeeded, 1 failed ===========
After that, when I try to open the Package.appxmanifest file the designer doesn't want to load due to the compiler error:
Severity Code Description Project File Line Suppression State
Error Validation error. error C00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 34, Column 6, Reason: Element 'Capability' is unexpected according to content model of parent element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Capabilities'. Expecting: {http://schemas.microsoft.com/appx/manifest/foundation/windows10}CapabilityChoice, {http://schemas.microsoft.com/appx/manifest/foundation/windows10}DeviceCapability. XYZ MusicBox C:\Users\mrrey\Box Sync\XYZ MusicBox\XYZ MusicBox\bin\x86\Debug\AppxManifest.xml
The weirdest part of it all is the fact that during creating the package VS is modifying my original appxmanifest file and adding this line to the capabilities:
<Capability Name="backgroundMediaPlayback" xmlns="" />
As you can see in the code above, I already have this capability added, but it requires a uap3: namespace to work correctly. For some reason it still forces this one, though. And what's with that xmlns attribute with an empty value?
After attempting packages creation I'm also getting a number of warnings like this one:
Severity Code Description Project File Line Suppression State
Warning Imported schema for namespace 'http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3' was not resolved. XYZ MusicBox C:\Users\mrrey\Box Sync\XYZ MusicBox\XYZ MusicBox\Package.appxmanifest 17
Everything works correctly when I remove the original Background Media Playback capability, but that's not something I can afford since it's a media player app.There's clearly something wrong with this capability/project's configuration but I can't find it.
This doesn't happen when I just build the solution and deploy the app to Local Machine/Device/Emulators.
I'm using up-to-date Visual Studio 2017 and Windows 10 (Version 10.0.14393 Build 14393).
Did anyone encounter a similar issue? Am I doing something wrong or is it a bug?
Thank you!
Edit: To make things even clearer: these short warnings (Imported schema for namespace...) are referring to <Applications>, <Application>, <Properties> and <Dependencies> tags.
Edit2: I don't even wanna think about this anymore. Somehow I broke it even more.

How do I run an MSBuild task before compilation starts, but after intermediary files are generated?

Background: StyleCop is complaining that an auto-generated file has poor formatting, leading to many warnings when I try to build my project. The auto-generated file is in the obj/ directory of my project, and I want to create an MSBuild task that prepends // <auto-generated/> to this file before compilation (but after it is generated) so that StyleCop doesn't complain.
Problem: I have the following MSBuild code
<!-- StyleCop complains about a file that's auto-generated by the designer,
so we need to prepend 'auto-generated' to it beforehand. -->
<Target Name="BeforeCompile" DependsOnTargets="MarkGeneratedFiles" />
<Target Name="MarkGeneratedFiles">
<PropertyGroup>
<GeneratedFilePath>$(MSBuildThisFileDirectory)obj\$(Configuration)\$(TargetFramework)\$(MSBuildProjectName).Program.cs</GeneratedFilePath>
</PropertyGroup>
<InsertIntoFile FilePath="$(GeneratedFilePath)" LineNumber="1" Text="// <auto-generated/>" />
</Target>
<!-- Code taken from http://stackoverflow.com/a/21500030/4077294 -->
<UsingTask
TaskName="InsertIntoFile"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<FilePath ParameterType="System.String" Required="true" />
<LineNumber ParameterType="System.Int32" Required="true" />
<Text ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Code Type="Fragment" Language="cs">
<![CDATA[
// By tradition, text file line numbering is 1-based
var lines = File.Exists(FilePath)
? File.ReadAllLines(FilePath).ToList()
: new List<String>(1);
lines.Insert(Math.Min(LineNumber - 1, lines.Count), Text);
File.WriteAllLines(FilePath, lines);
return true;
]]>
</Code>
</Task>
</UsingTask>
The file that I want to modify has the filename obj/Debug/netcoreapp1.0/BasicCompiler.Tests.Program.cs. In the above snippet, I have a BeforeCompile target that depends on MarkGeneratedFiles, which goes ahead and tries to insert // <auto-generated/> before the first line of that file.
I have tested, and this seems to work fine if the generated file is already present. However, if I remove the obj/ directory or I build from another machine, I get this error:
"C:\cygwin64\home\james\Code\cs\BasicCompiler\src\BasicCompiler.Tests\BasicCompiler.Tests.csproj" (default target) (1) ->
(MarkGeneratedFiles target) ->
C:\cygwin64\home\james\Code\cs\BasicCompiler\src\BasicCompiler.Tests\BasicCompiler.Tests.csproj(68,5): error MSB4018: The "InsertIntoFile" task failed unexpectedly.\r
C:\cygwin64\home\james\Code\cs\BasicCompiler\src\BasicCompiler.Tests\BasicCompiler.Tests.csproj(68,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find
a part of the path 'C:\cygwin64\home\james\Code\cs\BasicCompiler\src\BasicCompiler.Tests\obj\Debug\netcoreapp1.0\BasicCompiler.Tests.Program.cs'.\r
Basically it seems like the target is getting run before the file is getting generated, so there's nothing to prepend the text to. Is there a way to run it after this file gets generated, but before compilation?
Additional notes: So far, I have looked through all of the special target names here and tried using both BeforeBuild and BeforeCompile.
Also, since I am using the "new" StyleCop, I cannot put <ExcludeFromStyleCop> in my project file. See https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1145
I managed to work around this; see #stijn's super-helpful comment here.
First, I ran msbuild /v:detailed from the command line. This increases the verbosity of MSBuild so that it gives you a more detailed overview of what's going on, e.g. you can see the name of each target that's being run.
I searched through the log for the name of the target that was generating the file. In my case, it turned out to be GenerateProgramFiles.
I marked my custom target with AfterTargets="GenerateProgramFiles" so it ran after the file was generated.

sonar-dotnet-shared-library does not compile due non-existing dependencies, How to make it work?

I am trying to compile in my machine the sonar-csharp-plugin, but in the pom.xml file there is two dependencies that do not exist in the Maven public repositories:
<dependency>
<groupId>org.sonarsource.dotnet</groupId>
<artifactId>sonar-dotnet-tests-library</artifactId>
<version>1.5.0.393</version>
</dependency>
<dependency>
<groupId>org.sonarsource.dotnet</groupId>
<artifactId>sonar-dotnet-shared-library</artifactId>
<version>1.0.1.138</version>
</dependency>
I download the code of both projects and try to compile them and generate the .jar files for each one.
Trying to compile sonar-dotnet-shared-library-1.0.1.138, I installed the https://www.nuget.org/packages/SonarAnalyzer.CSharp/1.20.0 package and proceed to install it in my maven local repository then when I compile sonar-dotnet-shared-library-1.0.1.138 I get :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (unzip-nuget) on project sonar-dotnet-shared-library: An Ant Build Exception has occured: C:\Temp\sonar-dotnet-shared-library-1.0.1.138\target\analyzer\SonarAnalyzer.Scanner\protobuf does not exist.
[ERROR] around Ant part ...<copy todir="src/main/protobuf">... # 8:35 in C:\Temp\sonar-dotnet-shared-library-1.0.1.138\target\antrun\build-main.xml
I think I am in Maven hell.
What should I do to build the code from the latest release sonar-csharp-plugin??
Edit: when I installed the SonarAnalyzer I used
mvn install:install-file -DgroupId=org.sonarsource.dotnet -DartifactId=SonarAnalyzer.Scanner -Dversion=1.20.0 -Dpackaging=nupkg -Dfile="C:\Temp\SonarAnalyzer.CSharp.1.20.0-RC1.nupkg"
I disable the tasks that generate the error, now the java code start its compilation but I get errors related to
import org.sonarsource.dotnet.protobuf.SonarAnalyzer;
I think that it is a reference to the SonarAnalyzer Dll's, but neither Eclipse nor Maven are able to find it (protobuf is missing)
Edit2:
the POM.XML includes these tasks:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>unzip-nuget</id>
<phase>validate</phase>
<configuration>
<exportAntProperties>true</exportAntProperties>
<tasks>
<unzip src="${sonarAnalyzer.workDirectory}/SonarAnalyzer.Scanner.nupkg" dest="${sonarAnalyzer.workDirectory}/SonarAnalyzer.Scanner/" />
<delete>
<fileset dir="src/main/protobuf" excludes=".gitignore"></fileset>
</delete>
<copy todir="src/main/protobuf">
<fileset dir="${sonarAnalyzer.workDirectory}/SonarAnalyzer.Scanner/protobuf">
<include name="*.proto"/>
</fileset>
</copy>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>compile-protobuf-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<fileset id="fileset" dir="${project.basedir}/src/main/protobuf">
<include name="*.proto" />
</fileset>
<pathconvert refid="fileset" property="protos" pathsep=" " />
<mkdir dir="${project.build.directory}/generated-sources/protobuf" />
<chmod file="${protobuf.compiler}" perm="u+x" />
<exec failonerror="true" executable="${protobuf.compiler}">
<arg value="proto_path=${project.basedir}/src/main/protobuf" />
<arg value="java_out=${project.build.directory}/generated-sources/protobuf" />
<arg line="${protos}" />
</exec>
</target>
</configuration>
</execution>
</executions>
As I understand, in the SonarAnalyzer.Scanner.nupkg should be a protobuf folder, and the content of that folder is copied to src/main/protobuf.....well the SonarAnalyzer.Scanner.nupkg downloaded from Nuget does not contain that folder....so....
guys from Sonar...... Where do I get that nupkg?
I had the same problem, I've found the solution on this thread from SonarQube's Google group.
You need to fetch the missing artifacts from sonarsource's Artifactory server. As suggested by Duarte Meneses, you can add these lines to [user_home]/.m2/settings.xml :
<profiles>
<profile>
<id>sonarsource-repo</id>
<activation>
<property>
<name>!skip-sonarsource-repo</name>
</property>
</activation>
<repositories>
<repository>
<id>sonarsource</id>
<name>SonarSource Central Repository</name>
<url>https://repox.sonarsource.com/sonarsource</url>
<releases>
<enabled>true</enabled>
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonarsource</id>
<name>SonarSource Central Repository</name>
<url>https://repox.sonarsource.com/sonarsource</url>
<releases>
<enabled>true</enabled>
<!-- no need to always check if new versions are available when
executing a maven plugin without specifying the version -->
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
I used the above configuration.I also had mirrors declared in my settings.xml, so I had to exclude sonarsource from the mirrored repositories :
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*,!sonarsource</mirrorOf>
<url>http://ci-server/nexus/content/groups/public</url>
</mirror>
</mirrors>
Of course there are other ways to achieve the same result, for example by declaring a proxy repository in your company's Nexus server.
With this configuration, I built SonarQube successfully.

Unity Configuration and Same Assembly

I'm currently getting an error trying to resolve my IDataAccess class.
The value of the property 'type' cannot be parsed. The error is: Could not load file or assembly 'TestProject' or one of its dependencies. The system cannot find the file specified.
(C:\Source\TestIoC\src\TestIoC\TestProject\bin\Debug\TestProject.vshost.exe.config line 14)
This is inside a WPF Application project.
What is the correct syntax to refer to the Assembly you are currently in? is there a way to do this? I know in a larger solution I would be pulling Types from seperate assemblies so this might not be an issue. But what is the right way to do this for a small self-contained test project. Note: I'm only interested in doing the XML config at this time, not the C# (in code) config.
UPDATE: see all comments
My XML config:
<configuration>
<configSections>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
</configSections>
<unity>
<typeAliases>
<!-- Lifetime manager types -->
<typeAlias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
<typeAlias alias="external" type="Microsoft.Practices.Unity.ExternallyControlledLifetimeManager, Microsoft.Practices.Unity" />
<typeAlias alias="IDataAccess" type="TestProject.IDataAccess, TestProject" />
<typeAlias alias="DataAccess" type="TestProject.DataAccess, TestProject" />
</typeAliases>
<containers>
<container name="Services">
<types>
<type type="IDataAccess" mapTo="DataAccess" />
</types>
</container>
</containers>
</unity>
</configuration>
In unity 5.7
The section line should be like this
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection,Unity.Configuration" />
This looks fine. Are you sure your assembly name is correct? Check the project preferences to make sure the name of your assembly is correct:
Right click your project and click Properties
Click on the Application tab on the left
Look at the value of the "Assembly Name" field.
Sometimes if you've renamed your project, this field will still be the old value.
It's possible that this is not the issue at all, but it is the simplest thing to check. If you find that this is not the issue, reply to this and I'll post any other ideas I have.
Also, you might consider posting your sample as a .zip file so we can take a look at it.
I just had the same issue. this works for me :
Turn "Copy local" to true in the properties of Microsoft.Practices.Unity.
You should also add a reference to Microsoft.Practices.ObjectBuilder2 (Microsoft.Practices.Unity depends of it)

Categories