MSBee Project File works...

Topics: For MSBee Users
Aug 16, 2006 at 7:56 AM
migrated from power toy forums
originally posted by Jazzy
------------------------------------------------------

I created a empty project template file and added an empty class. When I created a basic console application, it built, ran and debugged from VS 2005 just fine using MSBee.

I'll be working on creating a template for some of the other projects and files over the weekend. But I was wondering, It can't be that easy can it? There has to be something I am missing.

I added this as expected:
<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.FX1_1.CSharp.targets" />

I also changed the path for the builds to this:

Debug:
<OutputPath>bin\FX1_1\Debug\</OutputPath>

Release:
<OutputPath>bin\FX1_1\Release\</OutputPath>

What I really want to do is have a build Target like Debug or Release... Just have not gotten that far yet. So then the custom template can build to either.
Aug 16, 2006 at 7:56 AM
originally posted by Craig Lichtenstein - MSFT
------------------------------------------------------

I haven't tried creating project templates so I have no experience in how easy it is. However, you mentioned that you're changing the OutputPath values. You don't need to do this since this is already handled within the MSBee common.targets file.
Aug 16, 2006 at 7:56 AM
originally posted by Jazzy
------------------------------------------------------

Unfortunatly I do because when I try to run the application under Visual Studio, it reports a missing file problem. This is because under the bin/FX1_1 folder it creates release and Debug folders under that. So when the build completes the IDE is looking for the executable at the root instead of at the full location path.

That is why I want different Target builds. So I can have different output paths for the 1.1 builds instead of needing to change the base build location for the project. But this does allow me to create a project specific to 1.1, so It would work either way. By mid week, I hope to have 2 samples to work with. One is the empty project I was talking about, and the other is a Windows Forms project. Maybe eventually they can be added to the repository here to be included as part of the deployment. I am not sure if everyone here would want the premade projects, but I would be happy to contribute them.
Aug 16, 2006 at 7:56 AM
originally posted by Jazzy
------------------------------------------------------

Here is the build details:

------ Build started: Project: Test2, Configuration: Debug Any CPU ------
Build started 3/13/2006 7:53:53 AM.
Initial Properties:
_DebugSymbolsProduced = true
_DeploymentApplicationManifestIdentity = Test2.exe
_DeploymentBuiltUpdateInterval = 0
_DeploymentBuiltUpdateIntervalUnits = Days
_DeploymentDeployManifestIdentity = Test2.application
_DeploymentFileMappingExtension =
_DeploymentPublishableProjectDefault = true
_DeploymentTargetApplicationManifestFileName = Test2.exe.manifest
_DeploymentUrl =
_DisabledWarnings =
_DocumentationFileProduced = false
_OriginalConfiguration = Debug
_OriginalPlatform = AnyCPU
_SGenDllCreated = false
_SGenDllName = Test2.XmlSerializers.dll
_SGenGenerateSerializationAssembliesConfig = Off
AddAppConfigToBuildOutputs = true
AllowedReferenceAssemblyFileExtensions =
.exe;
.dll

ALLUSERSPROFILE = C:\Documents and Settings\All Users
APPDATA = C:\Documents and Settings\rnorman\Application Data
AppDesignerFolder = Properties
APRICONVPATH = D:\Program Files\Subversion\iconv
AssemblyFolders20Suffix = AssemblyFoldersEx\Primary Interop Assemblies
AssemblyFoldersSuffix = AssemblyFolders
AssemblyName = Test2
AssemblySearchPaths =
{CandidateAssemblyFiles};
bin\FX1_1\;
;
{TargetFrameworkDirectory};
@(VisualStudioSearchPaths);
@(VisualStudioPIASearchPaths);
{HintPathFromItem};
{RawFileName}

AutoUnifyAssemblyReferences = false
AvailablePlatforms = Any CPU,x86,x64,Itanium
BaseIntermediateOutputPath = obj\FX1_1\
BuildDependsOn =
BeforeBuild;
CoreBuild;
AfterBuild

BuildingInsideVisualStudio = true
BuildingProject = false
BuiltProjectOutputGroupDependsOn = PrepareForBuild
CleanDependsOn =
BeforeClean;
CleanReferencedProjects;
UnmanagedUnregistration;
CoreClean;
CleanPublishFolder;
AfterClean

CleanFile = Test2.csproj.FileList.txt
CLIENTNAME = Console
CodeAnalysisInputAssemblyForTask = bin\Debug\Test2.exe
CodeAnalysisLogFileForTask = bin\Debug\Test2.exe.CodeAnalysisLog.xml
CodeAnalysisModuleSuppressionsFile = GlobalSuppressions.cs
CodeAnalysisRuleAssemblies = d:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules
CodeAnalysisTargets = C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\CodeAnalysis\Microsoft.CodeAnalysis.targets
CodeAnalysisUseTypeNameInSuppression = True
CommonProgramFiles = C:\Program Files\Common Files
CompileDependsOn =
ResolveReferences;
ResolveKeySource;
BeforeCompile;
_TimeStampBeforeCompile;
CoreCompile;
_TimeStampAfterCompile;
AfterCompile

CompileLicxFilesDependsOn =
CompileRdlFilesDependsOn = PrepareRdlFiles;RunRdlCompiler
COMPUTERNAME = MWS2
ComSpec = C:\WINDOWS\system32\cmd.exe
Configuration = Debug
ConfigurationName = Debug
ContentFilesProjectOutputGroupDependsOn = PrepareForBuild;AssignTargetPaths
CoreBuildDependsOn =
BuildOnlySettings;
PrepareForBuild;
PreBuildEvent;
UnmanagedUnregistration;
ResolveReferences;
PrepareResources;
ResolveKeySource;
Compile;
GenerateSerializationAssemblies;
CreateSatelliteAssemblies;
GenerateManifests;
GetTargetPath;
PrepareForRun;
UnmanagedRegistration;
IncrementalClean;
PostBuildEvent

CoreCleanDependsOn =
CoreCompileDependsOn = _ComputeNonExistentFileProperty
CoreResGenDependsOn =
CreateManifestResourceNamesDependsOn =
CreateSatelliteAssembliesDependsOn =
ComputeIntermediateSatelliteAssemblies

CustomAfterMicrosoftCommonTargets = C:\Program Files\MSBuild\v2.0\Custom.After.Microsoft.Common.targets
CustomBeforeMicrosoftCommonTargets = C:\Program Files\MSBuild\v2.0\Custom.Before.Microsoft.Common.targets
DebugSymbols = true
DebugSymbolsProjectOutputGroupDependsOn =
DebugType = full
DefaultLanguageSourceExtension = .cs
DefineConstants = DEBUG;TRACE
DelaySign =
DevEnvDir = D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\
DocumentationProjectOutputGroupDependsOn =
ErrorReport = prompt
FPNOHOST_CHECK = NO
Framework20RegistryBase = Software\Microsoft\.NetFramework
FrameworkDir = @(_TargetFrameworkDirectoryItem)
FrameworkRegistryBase = Software\Microsoft\.NetFramework
FrameworkSDKDir = @(_TargetFrameworkSDKDirectoryItem)
FxCopDir = d:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\
GenerateClickOnceManifests =
GetFrameworkPathsDependsOn =
GetRedistListsDependsOn =
GetFrameworkPaths

HOMEDRIVE = C:
HOMEPATH = \Documents and Settings\rnorman
INCLUDE = D:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\
IntermediateOutputPath = obj\FX1_1\Debug\
Language = C#
LIB = D:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
LoadTimeCheckItemLocation =
;
AppConfigFileDestination;

LoadTimeSensitiveItems =
;
AppConfigWithTargetPath;
AppConfigFileDestination;

LoadTimeSensitiveProperties =
;
MSBuildProjectFullPath;
CustomBeforeMicrosoftCommonTargets;
MSBuildExtensionsPath;
CodeAnalysisTargets;
ReportingServicesTargets;
CustomAfterMicrosoftCommonTargets;
CompileDependsOn;
ResolveReferencesDependsOn;
ResolveAssemblyReferencesDependsOn;
GetRedistListsDependsOn;
GetFrameworkPathsDependsOn;
PrepareForBuildDependsOn;
CoreCompileDependsOn;
PrepareResourceNamesDependsOn;
CreateManifestResourceNamesDependsOn;
BuildingProject;
BuildingInsideVisualStudio;
ResolveAssemblyReferencesStateFile;
CleanFile;
MSBuildProjectFile;
BaseIntermediateOutputPath;
BuiltProjectOutputGroupDependsOn;
DebugSymbolsProjectOutputGroupDependsOn;
DocumentationProjectOutputGroupDependsOn;
SatelliteDllsProjectOutputGroupDependsOn;
PrepareResourceNamesDependsOn;
CreateManifestResourceNamesDependsOn;
SourceFilesProjectOutputGroupDependsOn;
ContentFilesProjectOutputGroupDependsOn;
SGenFilesOutputGroupDependsOn;

LoadTimeSensitiveTargets =
;
Compile;
ResolveReferences;
BeforeResolveReferences;
SplitProjectReferencesByType;
ResolveProjectReferences;
ResolveVCProjectReferences;
ResolveNativeReferences;
GetRedistLists;
ResolveAssemblyReferences;
GetFrameworkPaths;
PrepareForBuild;
ResolveComReferences;
ResolveKeySource;
AfterResolveReferences;
BeforeCompile;
CoreCompile;
AfterCompile;
AllProjectOutputGroupsDependencies;
BuildOnlySettings;
AssignTargetPaths;
BuiltProjectOutputGroupDependencies;
DebugSymbolsProjectOutputGroupDependencies;
SatelliteDllsProjectOutputGroupDependencies;
DocumentationProjectOutputGroupDependencies;
SGenFilesOutputGroupDependencies;
AllProjectOutputGroups;
BuiltProjectOutputGroup;
DebugSymbolsProjectOutputGroup;
DocumentationProjectOutputGroup;
SatelliteDllsProjectOutputGroup;
PrepareResourceNames;
SplitResourcesByCulture;
CreateManifestResourceNames;
SourceFilesProjectOutputGroup;
ContentFilesProjectOutputGroup;
SGenFilesOutputGroup;
CopyRunEnvironmentFiles;
GetTargetPath;

LOGONSERVER = \\NEO
MaxTargetPath = 100
MSBuildAllProjects = ;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.CSharp.targets;C:\Documents and Settings\rnorman\My Documents\Visual Studio 2005\Projects\Test2\Test2.csproj;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets
MSBuildBinPath = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
MSBuildExtensionsPath = C:\Program Files\MSBuild
MSBuildProjectDefaultTargets = Build
MSBuildProjectDirectory = C:\Documents and Settings\rnorman\My Documents\Visual Studio 2005\Projects\Test2
MSBuildProjectExtension = .csproj
MSBuildProjectFile = Test2.csproj
MSBuildProjectF
Aug 16, 2006 at 7:57 AM
originally posted by Jazzy
------------------------------------------------------

When I try to run under the IDE, I get this message:

"Visual Studio cannot start debugging because the debug target '<path to Project>\bin\FX1_1\Test2.exe' is missing. Please build the project and retry, or set the OutputPath and Assembly Name properties appropriately to point at the correct location for the target assembly."

The real resulting path is "<path to Project>\bin\FX1_1\Debug\Test2.exe"

So I had to change the OutputPath in the project file to "bin\FX1_1\Debug\" in order for the IDE to find the the executable.
Aug 16, 2006 at 7:57 AM
originally posted by Craig Lichtenstein - MSFT
------------------------------------------------------

So, the root of the problem you're experiencing is that MSBee is only intended for building v1.1 projects on the command line; MSBee isn't designed to work with v1.1 projects from within Visual Studio. Thus, while you don't need to set $(OutputPath) for building on the command line, it seems like you need it to run the 1.1 application from within the IDE, which is a scenario we don't support. If you want the IDE experience, you really need to use VS 2003 for 1.1 projects.
Aug 16, 2006 at 7:57 AM
originally posted by Jazzy
------------------------------------------------------

I get it. I see what you are saying. I just wanted to see if anyone else knew about that. Maybe so, maybe not, but I just wanted to see if something was missing that I did not know about. It should not be that easy. It is just criminal. Don't change it though.

For those adventerous souls who only have the 2005 edition, give the changes I talked about a try in a new project template and see if you can get your debug and builds working in your environments. If it does work, I'll be glad to provide my templates I created if you don't want to go through all of them. I plan to try to go through every associated object and project where I can. I have both editions installed so that may be part of the reason why debugging and everything works just fine. I want to find out.

That is if I am not breaking any EULAs ( I don't think so since they give you the information on modifying the existing templates and files). It will be totally free of course.

Here is my sample if anyone wants to test it.

http://www.jazzynupe.net/Business/EmptyProject-1.1.zip

It is a empty C# project and is just a very simple modification just like the I mentioned previously. If you add a class file and remove the Generics using statement, it hhould build a console application just fine.
Aug 16, 2006 at 7:58 AM
originally posted by Craig Lichtenstein - MSFT
------------------------------------------------------

Well, the final release of MSBee will be shared source so people will be free to add additional features. I have no doubt that IDE integration will be attempted.