This project has moved. For the latest updates, please go here.

Visual Studio 2005 Help?

Apr 27, 2010 at 1:16 AM

Hi there,

I have Visual Studio 2005. Is there an experienced developer who can give me any advice with regards to building the code in VS2005?

All I want to do is tweak a little bit of code in the 'MidiNoteMapper' sample project, so that I can call functions for certain midi notes. The pre-built vsts from the VST.NET 0.8 package work fine in my VST host.

I've found one workaround so far, from here: http://stackoverflow.com/questions/5694/the-imported-project-c-microsoft-csharp-targets-was-not-found, and so I tweaked the "Jacobi.Vst.Samples.MidiNoteMapper.csproj" file like this:

 

Open your csproj file in notepad (or notepad++) Find the line:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

and change it to

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

That at least allowed me to open the project in VS2005.

But when I click 'Build Solution', there are these 28 errors:

Error    1    ; expected    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    101    48    Jacobi.Vst.Samples.MidiNoteMapper
Error    2    ; expected    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    103    41    Jacobi.Vst.Samples.MidiNoteMapper
Error    3    Invalid expression term ','    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    103    41    Jacobi.Vst.Samples.MidiNoteMapper
Error    4    ; expected    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    103    42    Jacobi.Vst.Samples.MidiNoteMapper
Error    5    ; expected    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    104    39    Jacobi.Vst.Samples.MidiNoteMapper
Error    6    Invalid expression term ','    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    104    39    Jacobi.Vst.Samples.MidiNoteMapper
Error    7    ; expected    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    104    40    Jacobi.Vst.Samples.MidiNoteMapper
Error    8    ; expected    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    105    38    Jacobi.Vst.Samples.MidiNoteMapper
Error    9    'Jacobi.Vst.Samples.MidiNoteMapper.PluginEditor.KnobMode.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\PluginEditor.cs    47    39    Jacobi.Vst.Samples.MidiNoteMapper
Error    10    'Jacobi.Vst.Samples.MidiNoteMapper.PluginEditor.KnobMode.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\PluginEditor.cs    47    44    Jacobi.Vst.Samples.MidiNoteMapper
Error    11    'Jacobi.Vst.Samples.MidiNoteMapper.Plugin.NoteMap.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\Plugin.cs    111    42    Jacobi.Vst.Samples.MidiNoteMapper
Error    12    'Jacobi.Vst.Samples.MidiNoteMapper.Plugin.NoteMap.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\Plugin.cs    111    55    Jacobi.Vst.Samples.MidiNoteMapper
Error    13    'Jacobi.Vst.Samples.MidiNoteMapper.MidiNoteMapperUI.NoteOnEvents.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    34    43    Jacobi.Vst.Samples.MidiNoteMapper
Error    14    'Jacobi.Vst.Samples.MidiNoteMapper.MidiNoteMapperUI.NoteOnEvents.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiNoteMapperUI.cs    34    48    Jacobi.Vst.Samples.MidiNoteMapper
Error    15    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteDetails.MapNoteItem.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteDetails.cs    22    42    Jacobi.Vst.Samples.MidiNoteMapper
Error    16    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteDetails.MapNoteItem.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteDetails.cs    22    47    Jacobi.Vst.Samples.MidiNoteMapper
Error    17    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteItem.KeyName.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteItem.cs    13    33    Jacobi.Vst.Samples.MidiNoteMapper
Error    18    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteItem.KeyName.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteItem.cs    13    38    Jacobi.Vst.Samples.MidiNoteMapper
Error    19    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteItem.TriggerNoteNumber.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteItem.cs    18    41    Jacobi.Vst.Samples.MidiNoteMapper
Error    20    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteItem.TriggerNoteNumber.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteItem.cs    18    46    Jacobi.Vst.Samples.MidiNoteMapper
Error    21    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteItem.OutputNoteNumber.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteItem.cs    23    40    Jacobi.Vst.Samples.MidiNoteMapper
Error    22    'Jacobi.Vst.Samples.MidiNoteMapper.MapNoteItem.OutputNoteNumber.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MapNoteItem.cs    23    45    Jacobi.Vst.Samples.MidiNoteMapper
Error    23    'Jacobi.Vst.Samples.MidiNoteMapper.MidiProcessor.Events.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiProcessor.cs    30    44    Jacobi.Vst.Samples.MidiNoteMapper
Error    24    'Jacobi.Vst.Samples.MidiNoteMapper.MidiProcessor.Events.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiProcessor.cs    30    57    Jacobi.Vst.Samples.MidiNoteMapper
Error    25    'Jacobi.Vst.Samples.MidiNoteMapper.MidiProcessor.MidiThru.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiProcessor.cs    35    32    Jacobi.Vst.Samples.MidiNoteMapper
Error    26    'Jacobi.Vst.Samples.MidiNoteMapper.MidiProcessor.MidiThru.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiProcessor.cs    35    37    Jacobi.Vst.Samples.MidiNoteMapper
Error    27    'Jacobi.Vst.Samples.MidiNoteMapper.MidiProcessor.NoteOnEvents.get' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiProcessor.cs    40    43    Jacobi.Vst.Samples.MidiNoteMapper
Error    28    'Jacobi.Vst.Samples.MidiNoteMapper.MidiProcessor.NoteOnEvents.set' must declare a body because it is not marked abstract or extern    C:\VST.NET\Samples\Jacobi.Vst.Samples.MidiNoteMapper\MidiProcessor.cs    40    56    Jacobi.Vst.Samples.MidiNoteMapper

So the following code is apparently an error in Visual Studio 2005 (from lines 101 -> 105 in MidiNoteMapperUI.cs) :

 

            dlg.MapNoteItem = new MapNoteItem()
            {
                KeyName = "New Note Map",
                TriggerNoteNumber = 64,
                OutputNoteNumber = 64
            };

 

I think I might have stumbled in a bit over my head ...  I'm experienced in Ruby, C and Visual Basic, but have been developing mainly on Linux in recent years. So C# and Visual Studio 2005 are pretty new to me, and I don't know what to do.

Would love to hear from anyone who can help me out.

 

Cheers,

Nathan Broadbent

Coordinator
Apr 27, 2010 at 6:24 AM
Edited Apr 27, 2010 at 6:25 AM

Hi Nathan,

That code uses some of the new compiler features of VS2008. You can rewrite it to:

dlg.MapNoteItem = new MapNoteItem();
dlg.MapNoteItem.KeyName = "New Note Map";
dlg.MapNoteItem.TriggerNoteNumber = 64;
dlg.MapNoteItem.OutputNoteNumber = 64;

I haven't checked the other errors but they are almost certainly caused by the same problem: your using an 'old' compiler. ;-)
Although VST.NET targets the .NET framework 2.0 (at runtime) its source code uses the compiler features of the VS2008 compiler.

I suggest you download and install the free VS2008 express edition and try again.

Hope it helps,
Marc Jacobi