Adding a new project to a migrated solution
- Right click on the solution and add a new project of type "Class Library", from the "Windows Classic Desktop" folder and call it
Northwind.ModuleName
- Delete the class.cs - we don't need it.
- In project settings:
- Make sure that it has the same .NET framework version of the original app.
- configure the Build "Output path" to:
..\bin\
for both Debug and release configuration.
- Add the project to the
msbuild.xml
file - so that it'll get included when you run theBuildDebug.bat
andBuildRelease.bat
<?xml version="1.0" encoding="utf-8" ?>
<Project DefaultTargets="Step4" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<Target Name="Step1" DependsOnTargets="">
<MSBuild Projects=".\ENV\ENV.csproj;" BuildInParallel="true" StopOnFirstFailure="true"/>
</Target>
<Target Name="Step2" DependsOnTargets="Step1">
<MSBuild Projects=".\NorthwindBase\NorthwindBase.csproj;" BuildInParallel="true" StopOnFirstFailure="true"/>
</Target>
<Target Name="Step3" DependsOnTargets="Step2">
- <MSBuild Projects=".\Northwind.Customers\Northwind.Customers.csproj;.\Northwind.Products\Northwind.Products.csproj;.\Northwind.Orders\Northwind.Orders.csproj;" BuildInParallel="true" StopOnFirstFailure="true"/>
<MSBuild Projects=".\Northwind.NewModule\Northwind.NewModule.csproj;.\Northwind.Customers\Northwind.Customers.csproj;.\Northwind.Products\Northwind.Products.csproj;.\Northwind.Orders\Northwind.Orders.csproj;" BuildInParallel="true" StopOnFirstFailure="true"/>
</Target>
<Target Name="Step4" DependsOnTargets="Step3">
<MSBuild Projects=".\Northwind\Northwind.csproj;" BuildInParallel="true" StopOnFirstFailure="true"/>
</Target>
</Project>
Add references to:
- From the
Assemblies
tab:- System.Windows.Forms
- System.Drawing
- From the
Browse
tab, select from the project'sbin
directory the following dlls:- ENV
- Firefly.Box
- NorthwindBase
- (Northwind.Share for larger migrated solutions)
- From the
Add a reference to it where ever you need it, or for more complex scenarios, use the AbstractFactory pattern described in: Calling Controllers across project scopes
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com