This project has moved and is read-only. For the latest updates, please go here.

Build Help Please

Topics: Build
Aug 28, 2013 at 1:52 AM
Edited Aug 28, 2013 at 2:15 AM
I am struggling to understand what is meant by the line "REM out the gacutil call in post build events (Core & Framework)". I'm sure it is something simple but I have followed the steps to the letter thus far. I appreciate any help.

I should also preemptively ask for some more explanation for the next line.

Im using VS2012 express, on windows 7.
Aug 28, 2013 at 2:19 AM
Edited Aug 28, 2013 at 2:19 AM
In the project properties, under post build you'll find a gacutil command line, remove it.
This is meant to register an official release of the library in windows shared assemblies cache but since you don't have the official keys you shouldn't sign or redistribute the assemblies.
Aug 28, 2013 at 11:36 PM
Thank you! I'm a bit of a noob when it comes to this stuff, ill probably be back with more questions in the future
Aug 29, 2013 at 12:19 AM
Okay, I am back! I'm trying to build the sample projects, but they are all failing due to missing the AssemblyInfo.Common.vs. I attempted to remove them and rebuild and came out with something around 300 errors for all kinds of stuff. The instructions don't mention anything along these lines and I am a bit lost. Hope you're willing to bear with me.
Aug 29, 2013 at 1:32 AM
Please put the assembly back in and copy paste the exact errors, especially the first ones occurring, they are labelled by numbers in VS. Locate which project is the main dependency and build only that project (not all). Also make sure you have removed code signing in the project properties.
Aug 30, 2013 at 1:18 AM
OK, i am back with the errors. the first that shows is

Error 2 Source file '............_AssemblyInfo\AssemblyInfo.General.cs' could not be found C:\Users\Jeff\Documents\VSTFiles\Source\Samples\Jacobi.Vst.Samples.CorePlugin\CSC Jacobi.Vst.Samples.CorePlugin

it seems like this error is coming up in every one of the projects.

I should also mention that when attempting to open them i was prompted to update for VS2012 and every one of these failed.

Thanks for your help
Aug 30, 2013 at 1:47 AM
OK now I get it, you don't need these AssemblyInfo.General.cs files keep only the AssemblyInfo.cs and AssemblyInfo.Version.cs.
Again make sure you remove all code signing, for Jacobi.Vst.Interop go into project properties configuration properties linker advanced and remove key file entry.

I downloaded from sources and it does compile after these steps.
Aug 30, 2013 at 2:09 AM
I must not have been clear, I am building the Samples, these errors are showing up in the sample solution. I have followed those instructions, build core, framework and interop all before even opening this solution.

I removed the key file entry, and made sure all of the projects are unsigned, now i am getting errors such as:

"Error 33 Type 'VstPluginAudioProcessorBase' is not defined. C:\Users\Jeff\Documents\VSTFiles\Source\Samples\Jacobi.Vst.Samples.Delay.VB\AudioProcessor.vb 6 14 Jacobi.Vst.Samples.Delay.VB"


"Error 1 The type or namespace name 'Framework' does not exist in the namespace 'Jacobi.Vst' (are you missing an assembly reference?) C:\Users\Jeff\Documents\VSTFiles\Source\Samples\Jacobi.Vst.Samples.Delay\TestPluginCommandStub.cs 3 22 Jacobi.Vst.Samples.Delay"

Maybe i need to set all of the references to the DLLs in my directory? thank you again for all the help.
Aug 30, 2013 at 2:18 AM
Before building the samples, you need to build the dependencies which are the libraries.

The solution you should look for first is in:

After this successful build you should see the DLL references in:

To confirm it is working, then open the sample solutions and check under the References folder.
Any missing assembly reference will be shown with a yellow triangle.

If it is a Vst.Net reference (think, you need to build Vst.Net libraries and add the correct reference in the sample project.
If you can't build the Vst.Net libraries it might be easier to download the binary version and put it in \Source_SharedAssemblies
Sep 4, 2013 at 12:14 AM
So I had to take a break over the holiday, but I have fixed my dependency problems. Back with a couple (and hopefully last) errors.

This same error with relative file paths shows up for each project:

"Error 8 The command "copy "C:\Users\Jeff\Documents\VSTFiles\Source\Samples\Jacobi.Vst.Samples.MidiNoteSampler\bin\Debug\Jacobi.Vst.Samples.MidiNoteSampler.dll" "C:\Users\Jeff\Documents\VSTFiles\Source\Samples.._SharedAssemblies\"
copy "C:\Users\Jeff\Documents\VSTFiles\Source\Samples.._SharedAssemblies\Jacobi.Vst.Interop.dll" "C:\Users\Jeff\Documents\VSTFiles\Source\Samples.._SharedAssemblies\Jacobi.Vst.Samples.MidiNoteSampler.dll"
copy "C:\Users\Jeff\Documents\VSTFiles\Source\Samples\Jacobi.Vst.Samples.MidiNoteSampler\bin\Debug\Jacobi.Vst.Samples.MidiNoteSampler.*" "C:\Users\Jeff\Documents\VSTFiles\Source\Samples\BuildResults\CLR2\AnyCPU\Debug\"
copy /Y "C:\Users\Jeff\Documents\VSTFiles\Source\Samples.._SharedAssemblies\Jacobi.Vst.Samples.MidiNoteSampler.*" "C:\Users\Jeff\Documents\VSTFiles\Source\Samples\BuildResults\CLR2\AnyCPU\Debug\"
" exited with code 1. Jacobi.Vst.Samples.MidiNoteSampler"

Could this be a difference in the workings between vs2012 and vs2010?

There were also acouple dependency problems; System.Drawing and System.configuration references were missing, but after adding those it all works fine.

Thanks for all your help again, i hope these questions havent gotten annoying :D
Sep 4, 2013 at 5:16 AM
Edited Sep 4, 2013 at 5:17 AM
This looks like a path doesn't exist. Make sure the path exists, check by executing the copy instruction directly in the command prompt. I'm pretty sure these instructions are in the post build in project properties. As long as everything compiles these errors are not crucial because you could just copy the files manually or put the commands in an external batch file and remove the post build. Another option if this is a path error would be to hardcode the path (remove variables in the post build like SolutionDir, ProjectDir ect.. use c:\xxx\ *.dll ).
Don't worry about asking questions I like to help when people are trying :)
Sep 5, 2013 at 12:12 PM
Good news!! The directories do exist, and the calls are completing. I am not sure why the error messages are popping up, but when I run the commands in cmd they prompt me to overwrite the files. I assume this might be because of differences between vs2012 and previous versions. Other than that the projects are building correctly.

Thanks for your help YuryK
Sep 5, 2013 at 12:28 PM
Edited Sep 5, 2013 at 12:32 PM
These copy commands were added to automate the build (see also the build folder) to help me with being able to release consistently and quickly. Any of the copy commands that refer to the "BuildResults" as target folder can be ignored/deleted.

OR you can run the CreateBuildResults.cmd batch file from the Build sub folder - call it from the Source/Samples folder. That will create all the required folders for you.
Oct 17, 2013 at 2:17 AM
Edited Oct 17, 2013 at 2:18 AM
Hi. I'm having a similar problem when trying to build the source code. The only modification I've made was in app.config, to allow this to run on my machine.

The top of my app.config looks like this now:
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    <legacyCorruptedStateExceptionsPolicy enabled="true"/>
I've removed all code signing and tried following the steps here but I'm getting the following output.

1>------ Build started: Project: Jacobi.Vst.Core.Clr4, Configuration: Debug Any CPU ------
1>CSC : error CS2001: Source file '............_AssemblyInfo\AssemblyInfo.General.cs' could not be found
2>------ Build started: Project: Jacobi.Vst.Interop, Configuration: Debug Win32 ------
3>------ Build started: Project: Jacobi.Vst.Framework.Clr4, Configuration: Debug Any CPU ------
3>CSC : error CS2001: Source file '............_AssemblyInfo\AssemblyInfo.General.cs' could not be found
2> Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1
2> for Microsoft (R) .NET Framework version 4.00.30319.18331
2> Copyright (C) Microsoft Corporation. All rights reserved.
2> cl /c /AI"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0" /AI"C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral" /Zi /clr /nologo- /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D JACOBIVSTINTEROP_EXPORTS /D _WINDLL /Gm- /EHa /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"obj\Win32\Debug\Jacobi.Vst.Interop.pch" /Fo"obj\Win32\Debug\" /Fd"obj\Win32\Debug\vc110.pdb" /doc"obj\Win32\Debug\" /TP /FU"C:\Users\Jake\Downloads\vstnet-71210\Source\Code\Jacobi.Vst.Core\bin\Debug\Jacobi.Vst.Core.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Configuration.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Drawing.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Windows.Forms.dll" /analyze- /errorReport:prompt /clr:nostdlib stdafx.cpp
2>cl : Command line warning D9035: option 'nologo-' has been deprecated and will be removed in a future release
2> stdafx.cpp
2>stdafx.cpp : fatal error C1192: #using failed on 'C:\Users\Jake\Downloads\vstnet-71210\Source\Code\Jacobi.Vst.Core\bin\Debug\Jacobi.Vst.Core.dll'
2> 'The system cannot find the file specified.'
4>------ Build started: Project: Jacobi.Vst.UnitTest.Clr4, Configuration: Debug Any CPU ------
4>CSC : error CS2001: Source file '............_AssemblyInfo\AssemblyInfo.General.cs' could not be found
========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

I apologize, I'm also super new at Visual Studio, and although I am a great researcher, I really don't know where to start with this bug. Thank you.
Oct 17, 2013 at 2:49 PM
Read post at Aug 29 at 8:47 PM.

You don't need references to 'AssemblyInfo.General.cs', these are used to build an official build. Remove the reference to this file in all the projects.
Oct 18, 2013 at 5:09 AM
I see. Forgive my lack of familiarity with Visual Studio. I did not know how to remove them properly. Thanks for pointing me in the right direction. Core and Framework built fine, but Interop was throwing an error.

1>------ Build started: Project: Jacobi.Vst.Interop, Configuration: Debug Win32 ------
1> Creating library C:\Users\Jake\Downloads\vstnet-71210\Source\Code\Jacobi.Vst.Interop\bin\Win32\Debug\Jacobi.Vst.Interop.lib and object C:\Users\Jake\Downloads\vstnet-71210\Source\Code\Jacobi.Vst.Interop\bin\Win32\Debug\Jacobi.Vst.Interop.exp
1>LINK : fatal error LNK1256: ALINK operation failed (80040414) : Error reading key file '............_keyfile\Jacobi.snk' -- The system cannot find the path specified.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

For anyone else running into this error (who is as much of a noob as I am :p), you need to remove the signing from Interop by Right Clicking Jacobi.Vst.Interop in your Solution Explorer window and clicking Properties. Once the Properties window pops up, go to:

Configuration Properties > Linker > Advanced > Key File

Then, you click <inherit from parent> (or something like that) or I THINK you can just delete the string in that field.

Thanks for you help YuryK, very much looking forward to using this!