HOW TO BUILD A WEB PROJECT INTO MULTIPLE .DLL? - dll

I have a Web Project that has three Folder(A,B,C) that contains .cs files.
There will be one .DLL Build by VS by default.
but now I want to Build the project into multiple .dll files(A.dll, B.dll,C.dll),
Any one tell me how can I make it?

Separate them into 3 projects A,B & C (still in same solution)
and then add Project Reference to the main Web Project

Related

Disable MSBuild WPP for a specific web project in a solution

I have a Visual Studio solution with a number of projects, two of which are configured as Web Applications.
Project A is used as a class library, but it includes TypeScript files. In order to get the .ts files compiling into .js files, the .csproj file was updated so that it imports Microsoft.WebApplication.targets as well as Microsoft.TypeScript.targets. (The generated .js files are configured as 'Embedded Resources').
Project B is a regular Web Application and references Project A.
Compiling with msbuild /p:DeployOnBuild=true causes the Web Publishing Pipeline to be invoked on both projects (packaging up the contents).
Is there a way to prevent (or minimise) WPP running on Project A?

How to make XamarinStudio generate object files into a seperate directory?

Let's take this one by example. I'm developing on linux and using XamarinStudio for all of my .NET projects. I like it more than having VisualStudio running in the virtual machine. I have a solution that has several projects in it, that looks like this:
/Solution
/Solution/Project1 -> project number 1
/Solution/Project2 -> project number 2
/Solution/Project3 -> project number 3
/Solution/Output -> output folder for all projects
/Solution/Temp -> temporary files for all projects
I'm able to set the output directory for all projects, but I don't know how to set projects to generate temporary files to the Temp folder. Right now temporary files are generated into /Solution/ProjectX/obj/x86/Debug/ and /Solution/ProjectX/obj/x86/Debug/. How can I change it? I couldn't find the way to set it in the project/solution properties.
If you are using MSBuild to build your projects from within Xamarin Studio then you can use the IntermediateOutputPath element in the project file (.csproj) to override the default directory where obj files are stored.
<IntermediateOutputPath>..\Temp\ProjectX\obj\$(Configuration)\</IntermediateOutputPath>
You can change where obj files are saved by editing the project file (.csproj) in a text editor and adding the IntermediateOutputPath so it points to your temp directory. You will probably want to have different directories for each project.
I tried this with Xamarin Studio 5.7 with Mono 3.12 on the Mac and it seems to work. This should also work with Visual Studio.

Indirect references in VB.NET solution breaking build

Project A references Projects B. Project B references Project C. Project A does not reference Project C.
This builds fine locally. However, on the build server it errors out because Project A does not reference Project C.
Error:
error BC30009: Reference required to assembly 'ProjectC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' containing the implemented interface 'ProjectC.IFoo'. Add one to your project.
How can I catch this before committing?
Edit:
Here's more info on my issue: http://sstjean.blogspot.com/2006/11/msbuild-cant-find-secondary-references.html
Here are two things you can do as a best practice to ensure your projects are referenced correctly and MSBuild will be able to find your referenced projects correctly.
Use project references instead of referencing dll's. Create a folder called dependencies or libs and place any referenced dll's within this folder.
Check the build order and project dependencies tab for each project by right clicking project and selecting project build order. Ensure that every reference in your project is being built by that project.
MSBuild does not know what a .sln file is. MSBuild reads and parses the .sln file to determine the build order of projects. By having project references MSBuild will be able to traverse and build the projects in the correct order. See below link for more information.
This link also helps explain why you would see different behavior and how to catch it.
Visual Studio Integration (MSBuild)
Within Visual Studio, the solution file and project build ordering are controlled by Visual Studio itself. When building a solution with msbuild.exe on the command line, MSBuild parses the solution file and orders the project builds. In both cases the projects are built individually in dependency order, and project to project references are not traversed. In contrast, when individual projects are built with msbuild.exe, project to project references are traversed.
When building inside Visual Studio, the property $(BuildingInsideVisualStudio) is set to true. This can be used in your project or .targets files to cause the build to behave differently.
Go to your project references and right click Oracle.DataAccess then go to properties and in properties page make sure that specific version is false and copy to local is set to true.

Compile xcode project into a library file

I have two projects that are build on 2 different compilers. I need to combine both into one single app. Found out from a source that it is possible to compile any one of the project into a library and add it into the other to use it.
I fairly new this concept. Has any one done anything like this? How do i convert one of the project into a library and how would i connect the two? Will i still able to call the views in that project(library) in my other project? I am using XCODE 4.2 and iOS 5.
Create a "Cocoa Touch Static Library" to build your "Project"/target, and include the then-built library (with its public headers) into the second one. Note that the details depend quite a bit on what you mean by "project" and by "call the views" (which looks a bit wrong).
If you have two existing projects (with .xcodeproj files), open the "app" project (guessing one is of such kind), and include the lib project inside it (by drag & drop, or by "Add Files..."). Not the opposite.
Then in the "Build Phases" of the app project, you can add your "lib" project as a target dependencies (making your lib to always build when building your app). Finally, add the lib project product (the .a) in the "Link" build phases of the "app" project.

Team Build - Replace Project References with dll's

Following Situation:
2 Team Projects
Dvelop of Team Project A added Project References of Team Project B to their projects.
For speeding up the Build I want to replace the project references with referencing the dll's directly.
My Idea:
in the csproj of Team Project A:
<ProjectReference Condition="'$(IsDesktopBuild)' == 'true'" Include="[Project Reference] >...
in the TFSBuild.proj
<AdditionalReferencePath Include="[buildoutputOfTeamProjectB]" />
OR
Disable SolutionToBuild and use the csproj files directly.
Thanks for your suggestions.
I would suggest that each project have a dependencies folder that contains the appropriate dlls that are required for each project. When a project that is depended upon is built it would be up to you to automatically update the dll in the dependencies folder or not via your build process (cruise control/nant/msbuild?). However, I would also give some consideration around deploying versions of the depended upon dll just in case you blow up the dependent projects usage of that dll. It would suck for someone to update their project (the depended on project), kick off a build, deploy their build output to the dependent project) only to break the project that relies on their code base. That sounds like a fragile way of managing dependencies.