Sorry I did not get back to you sooner. Without a version of Visual
Studio which can work with class library projects, you will have some
difficulty. To get around it to create assemblies with embedded
resources you can instead use MSBuild.
Below is a modified copy of a C# project file. Changing it from csproj
to vbproj may be all you need to do to make it a VB project. You can
use MSBuild to compile this project. Note the ItemGroup listing the
EmbeddedResource elements. You can edit that to add to your embedded
resources. I also set the default namespace to XYZ which you can
change.
What you will need below the folder holding this .csproj file is a
Properties and Resources folder for these files...
Properties\AssemblyInfo.cs
Resources\icon1.jpg
Resources\icon2.jpg
In AssemblyInfo.cs you will want this code, or for VB.NET you just
adjust the brackets.
C# version:
[Assembly: WebResource("XYZ.Resources.icon1.gif", "image/gif")]
[Assembly: WebResource("XYZ.Resources.icon2.gif", "image/gif")]
VB.NET Version:
<Assembly: WebResource("XYZ.Resources.icon1.gif", "image/gif")>
<Assembly: WebResource("XYZ.Resources.icon2.gif", "image/gif")>
# library.csproj
<Project DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9EAB7BCD-B236-48C2-A986-BA0261935041}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>XYZ</RootNamespace>
<AssemblyName>XYZ</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\icon1.jpg" />
<EmbeddedResource Include="Resources\icon2.jpg" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the
targets below and uncomment it.
Other similar extension points exist, see
Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Brennan Stehling
http://brennan.offwhite.net/blog/