Using Memory Stream

I am struggling to use memory stream to load a .wav resource using the code:

Steinberg::MemoryStream resourceStream(resourceData, resourceSize);
  resourceStream.read(audioData_, header_.subChunk2Size, 0);

I got a linker error and noticed that public.sdk/source/common/memorystream.h is not included in the standard build. So I added it to my plugin like this -

smtg_add_vst3plugin(MyPlugin
    ${vst3sdk_SOURCE_DIR}/public.sdk/source/common/memorystream.h
    ${vst3sdk_SOURCE_DIR}/public.sdk/source/common/memorystream.cpp
    source/version.h and others

However this throws a very unhelpful error in Visual studio:

error MSB3073: The command "setlocal

Any suggestions on how get out of this or more generally how to read a .wav resource file ?

did you check Preparation on Windows - VST 3 Developer Portal (steinbergmedia.github.io)?
you could try too to start Visual as Administrator