Does VS2010 run activities in WF project during compile? - visual-studio-2010

I've just encountered a compile error I've not seen before. In a solution that contains Windows Workflow Foundation 3 projects, Visual Studio reports that it failed to compile the projects because it couldn't find an application-specific configuration file. The configuration file is NOT added to any of the projects. It is looked for only at runtime by the workflows. Other solutions using the same runtime config file compile without error. If I put the config file in the expected location then the workflow solution compiles without error.
The behavior suggests that when VS2010 is compiling WF3 projects that it is actually running the activities contained in the project at some point during the compile. Does VS actually run activities in WF projects during compile? Does it create activities? If it doesn't, why would the compile error be thrown for a file that isn't part of the project?

Actually I believe it suggests you have a compile time dependency on the config file in question on this one solution that you do not have in the others you mentioned.
Check if the error provides any details as to WHERE it has this compile time dependency and remove it if it is not needed. If there is nothing informing you or hinting where this may be, start digging into the various project properties in question and see if you have a build dependency on the config file.

Related

TypeScript compilation outside of project created with Visual Studio

I have inherited a large LOB application that is built using TypeScript. The project has no reference paths in any of the files due to the fact it has been setup and created using Visual Studio 2013 - Visual Studio seems to have some magic where it will pick up the global TypeMaps itself. scoff.
The current build process has been to use Grunt to copy the compiled .js files (which are generated on save in Visual Studio) to a build directory - not actually compile them.
(to further reinforce this point, Grunt is NOT compiling any TypeScript).
This build process is now no longer acceptable as I am moving the application to a build through a Continuous Integration process, using Team City and Command Line tsc.exe/Grunt - so when the repository is checked out there are obviously no generated .js files in the project.
In its current state there is a host of compilation errors when trying to use Command Line tsc.exe/Grunt to compile the TypeScript files, I think due to the fact that the application is not using reference paths?
Does this mean I'm going to need to add all of the relevant reference paths to each file in the project?
Has anyone got any experience regarding this kind of setup and could point me in the right direction to manage these reference paths and build process?
Thanks
In its current state there is a host of compilation errors when trying to use Command Line tsc.exe/Grunt to compile the TypeScript files, I think due to the fact that the application is not using reference paths
No. You should use a tsconfig.json which will create the compilation context.
More
https://basarat.gitbooks.io/typescript/content/docs/project/project.html
A solution has been found.
Using the Visual Studio configuration options in the grunt-ts task I have setup the task to specifically use the projects .csprog and TypeScript 1.4 compiler (we are locked into this compiler).
My configuration for the grunt-ts task:
ts: {
default: {
vs: "Consortium.Client.Web.csproj",
options: {
compiler: "1.4/tsc"
}
}
}
I hope on the off chance, this helps someone else.

Visual Studio not able to run ".lib" file?

I am trying to build a project from the following Source Code (it accompanies a book I am currently reading). Unfortunately, visual studio can not run a library with the name "cyclone_d.lib". I believe this is because visual studio simply can not locate the file. I have spent several hours trying to fix this problem by changing the settings in the linker and project, for example adding Additional Directories, but I have not been able to get any results.
Please let me know how I can fix this problem and compile the code.
Thank You!
Your link to source points only to some Unix-style source files but no VS project files. So I can only guess and give general help.
A VS solution contains one or more projects. Each project has a build target, in most cases a EXE, DLL, or static library LIB. When you have a solution that includes an project with an EXE build target set the option "Set as StartUp Project" at that project in the solution tree.
If you don't have an EXE change your project setup to create a Win32 executable instead a library. For this task the most simple approach is creating a new project (Win32 Console Application or Win32 Project) and add all the source files.

VS10 Generate Release Build from Debug Build

We have a large solution here, with several dozen projects. The only build configuration which has been maintained is the Debug. When switching to release, I get over 300 error messages, mainly:
"Error The type or namespace name 'XXX' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\TFS\...\SomeClass.cs"
and a few
"Error Metadata file 'C:\TFS\...\some.dll' could not be found SomeProject"
Is there a way to take the debug configuration completely, and generate a working release one? Preferably automatically/script based, to be done by build server for each release? Most projects are C#, with one or two in C++ or Managed C++ (these dont throw errors).
Could it be that those errors are coming from not building all the projects in the Release configuration?
Check this trough the Configuration Manager and see if all projects are selected to build for the Release configuration.
You can also create a new configuration and then select a configuration to inherit the settings from. Maybe you can create a copy of your debug configuration this way?
For automating a build, you can always use a combination of Powershell and MSBuild to script your build. If you have Team Foundation Server you can use TFS automated builds and publish them to a specified location.

Visual Studio Project dependencies

I have a Visual Studio .Net Solution which has many projects/libraries.
When I work locally on my own PC there is no problem as I tend to recompile those libraries that I have just changed and everything is in sync.
The problem is sometimes other developers who once in a while require to work on or look at my code have an enormous problem recompiling everything.
In the configuration Manager, I do not have all projects checked else it would take too long to build everything whislt working.
Problem is when the solution is compiled on another application, some of the errors reported say a particular library has error and its taking too long to figure out all the dependencies compiling each one individually.
Even when checking everything in the config manager it still does not seem to compile correctly.
I thought when you add a reference to a library the dependencies are taken care of.
Is there a simple way to make sure the solution determines what are the correct dependencies and make sure everything is built in the correct order?
Thank you
After other developers got new source codes from you, they should close Visual Studio and reopen the solution.
Sometimes there are also troubles with dependencies in Visual Studio. First, try these menu commands:
Build > Clean Solution
Build > Rebuild Solution
This will show you which dependencies are cyclic or not correct.
Also, in Visual Studio project must not depend on another one which creates executable (at least for our pure C++ -written project this is true). I.e. "Utils" project which compiles into "Utils.dll" cannot depend on "MyApp" project, which exports some functions or symbols and compiles into both MyApp.exe and MyApp.lib (or some other kind of assembly). If you have such a dependency, you must correctly setup project build order and manually set MyApp.lib as in linker inputs.
You can package and distribute your assemblies using http://nuget.codeplex.com/. It's made to solve this problem.

Setup project not finding the dependencies of a project primary output

In Visual Studio 2008 I've added a project's primary output to a setup project but the project's dependencies are not being found.
If I look at the properties of the primary output the Dependencies property shows as (None). If I look a little deeper then I can find that the Dependencies property under the KeyOutput property has the projects dependencies listed and some of those have yellow warning triangles next to them.
This has only started happening since I put the startup project into source safe.
Because of this problem the setup project will not build and I get this error:
------ Starting pre-build validation for project 'PROJECT' ------
ERROR: An error occurred while validating. HRESULT = '80004005'
I ran into this problem when branching and combining various versions of my libraries into projects without making sure that the libraries all referenced the correct versions of each other. Deleting and re-adding my inter-library references fixed the problem.
Are the dependencies by chance in the GAC? We ran into a similar issue on our build server when someone's post-build script GAC'd a few assemblies. Our installers would no longer package those items in the install, so the app would fail to run when later installed in test.

Resources