Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Contribution for Issue #496 #1158

Closed
wants to merge 57 commits into from

Conversation

AustinHull
Copy link
Contributor

Issue #496

Hello everyone!
Full Disclosure: I'm a second-year CS undergrad who is extremely new to open-source software development, but I've really been wanting to get involved with it for some time, so being a fan of MS, I hoped I might be found to be of even a little use here.

Looking in the issues list, I noticed one (#496) mentioning a problem with the project template not generating a proper, unique default project name for each subsequent project creation of the type "From Existing Code".

My experience with this software's code is extremely limited, but looking through MSDN's documentation for *.vstemplate files, as well as comparing the template code for the aforementioned type with that of other types - such as NodeJS WebApp - I've noticed that the tag used in the bugged project type differs from the name of the target file checked within the tags, unlike with other project types. In an effort to possibly fix this, I've changed the tag to "FromExistingCode" to match the name of the target file ("FromExistingCode.njsproj").

While I'm aware that I should be testing this on my end, I'm afraid that even after pulling an all-nighter trying to get the cloned builds working on my system, I still seem to be getting about 9 build errors out of 27 total builds, mostly because of some "TestUtilities.UI.dll" files it appears. If anyone could try to splice the content of this commit into their own working build to possibly test at their convenience, I would be extremely appreciative to hear of their results and feedback. Again, I do apologize if I'm coming off as rude, burdensome, or hindering with regards to this project's workflow - I'm just trying to dip my toes into open-source contributing in any way I can, and your time and feedback is greatly appreciated in helping me become a better software developer for the future!

Best Regards,
Austin Hull, Drexel University, Philadelphia

@msftclas
Copy link

Hi @AustinHull, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, MSBOT;

@mjbvz
Copy link
Contributor

mjbvz commented Jul 25, 2016

Thanks for the contribution!

However it looks like you forked the lightweight-install branch and built on that. That's why it says this PR shows 62 changed files. The lightweight installer work is still ongoing and being actively worked on with #1139, and we do not want to take it in just yet.

Instead, create a new branch off master for your pull request, apply your fix, and submit that instead. The commands to do this would look something like:

# Create new branch from master
git checkout -b fix-for-496   master

# Apply your change to the new branch
git cherry-pick 3f03b1d

Regarding getting a build for testing, were you following our build instructions. Was anything unclear in these instructions or could they be improved? What are the errors you are currently seeing?

If you need to, you can always grab a build from AppVeyor as well under the artifacts tab. Here's the example build from your contribution: https://ci.appveyor.com/project/mousetraps/nodejstools/build/1.0.748/job/yvdk5yie2awfu33s/artifacts

Being able to test locally would be much faster however, so let's see if we can get you started with that.

@AustinHull
Copy link
Contributor Author

Hello mjbvz, thank you for all the helpful advice and feedback, I really appreciate it!

I'm working on porting my commit to a new branch now, just as you've said, but I do seem to still be rather confused on how the testing of this project works, considering it's a VS extension. I downloaded the AppVeyor build, but I'm not too sure where I'm supposed to put it in order to test my results. I've managed to startup the Experimental Instance of VS via the dev console, but that's about as far as I could get from the documentation provided.

As for getting the build to run locally, I have tried my best to follow the build instructions posted, but I'm wondering if my issues may be stemming from Part 2 of that process. No matter what I do to try and elevate cmd.exe to admin access, I can never seem to execute the *.ps1 file for environment setup (the prompt keeps telling me - despite my admin privileges. that I do not have permission to access the file), so I attempted to follow the manual alternative, running the registry file to enable the verification skip, and placing the .target file in the specified VS folders (I seem to have three different version folders within my VisualStudio directory).

Thank you again!

@mjbvz
Copy link
Contributor

mjbvz commented Jul 25, 2016

Using the appveyor build, you should just be able to run the installer msi. Again, this is an unsigned build and installing this way is not recommended, but it should work.

Can you also copy paste the error you are seeing to provide some more context so we can diagnose the problem. Thanks.

@AustinHull
Copy link
Contributor Author

Oh, of course, thank you! The errors I seem to be getting while building NodejsTools.sln are:

3>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found

3>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found

5>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found

11>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found

11>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found

8>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found

9>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found

9>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found

14>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found

14>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found

I haven't deleted any files from the project, so I'm not sure why these files aren't being found, but I don't have as much experience with DLLs as I would prefer to have, so maybe I made a simple setup mistake? Thank you again for all your help!

@AustinHull
Copy link
Contributor Author

On installing the AppVeyor build, I've noticed that my change hasn't solved the problem, BUT I have noticed that properly functioning project templates seem to each create a folder dedicated to each project within VS's Projects folder, whereas the FromExistingCode project template does not. Perhaps I can look into this as a possible cause.

@mjbvz
Copy link
Contributor

mjbvz commented Jul 26, 2016

@AustinHull For the build, are you running the commands from a vs developer command prompt? Can you share the output from running these commands:

msbuild /version

and

where msbuild

Do any of the referenced files from the error exist? It may be helpful if you could share the entire output from running msbuild, starting with the msbuild command itself.


As for the fix, I'm actually not sure of what the root cause of the problem is, so identifying what is different between this template and the other templates sounds like a great starting point. Keep in mind that Vs does cache templates, which can cause problems while testing, so make sure you run devenv /setup or devenv /InstallVSTemplates after installing anew build.

It'd be best if you can get building NTVS in VS directly since that allows testing changes much more quickly. What errors were you seeing that prevented that from working?

@AustinHull
Copy link
Contributor Author

AustinHull commented Jul 26, 2016

@mjbvz Alright, heres the output from the command prompt:

C:\Program Files (x86)\Microsoft Visual Studio 14.0>msbuild /version
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

14.0.25420.1
C:\Program Files (x86)\Microsoft Visual Studio 14.0>where msbuild
C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

Additionally, the entire Build Log is comprised of the following:

Error occurred while restoring NuGet packages: An error occurred while reading file 'C:\Users\austi_000\Documents\nodejstools\Nodejs\Tests\NpmTests\packages.config': There are duplicate packages: Newtonsoft.Json
1>------ Build started: Project: Nodejs, Configuration: Debug x86 ------
2>------ Build started: Project: TestUtilities.UI, Configuration: Debug x86 ------
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2>C:\Users\austi_000\Documents\nodejstools\Common\Tests\Utilities.UI\UI\AutomationWrapper.cs(21,35,21,45): error CS0234: The type or namespace name 'VSTestHost' does not exist in the namespace 'Microsoft.VisualStudioTools' (are you missing an assembly reference?)
2>C:\Users\austi_000\Documents\nodejstools\Common\Tests\Utilities.UI\UI\EditorWindow.cs(32,35,32,45): error CS0234: The type or namespace name 'VSTestHost' does not exist in the namespace 'Microsoft.VisualStudioTools' (are you missing an assembly reference?)
2>C:\Users\austi_000\Documents\nodejstools\Common\Tests\Utilities.UI\UI\TestExtensions.cs(24,35,24,45): error CS0234: The type or namespace name 'VSTestHost' does not exist in the namespace 'Microsoft.VisualStudioTools' (are you missing an assembly reference?)
2>C:\Users\austi_000\Documents\nodejstools\Common\Tests\Utilities.UI\UI\VisualStudioApp.cs(29,35,29,45): error CS0234: The type or namespace name 'VSTestHost' does not exist in the namespace 'Microsoft.VisualStudioTools' (are you missing an assembly reference?)
2>C:\Users\austi_000\Documents\nodejstools\Common\Tests\Utilities.UI\UI\VisualStudioInstance.cs(25,35,25,45): error CS0234: The type or namespace name 'VSTestHost' does not exist in the namespace 'Microsoft.VisualStudioTools' (are you missing an assembly reference?)
3>------ Build started: Project: TestUtilities.UI.Nodejs, Configuration: Debug x86 ------
4>------ Build started: Project: SharedProjectTests, Configuration: Debug Any CPU ------
3>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
3>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found
4>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
4>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found
4>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found
1>  Restoring NuGet packages...
1>  To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
1>  All packages listed in packages.config are already installed.
1>  Nodejs -> C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\CloudService.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\TypeScriptAzureExpressWebRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\TypeScriptAzureNodejsWorkerRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\TypeScriptAzureWebRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\Express4App.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AzureExpress4App.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AddWebSiteExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AddWebSiteAzureExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\NodejsWebApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AddWebSiteAzureNodejsApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AddWebSiteNodejsWebApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AzureNodejsApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\NodejsConsoleApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\FromExistingCode.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AddWebSiteAzureStarterExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AddWebSiteStarterExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AzureStarterExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\StarterExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\JavaScript\Node.js\1033\AzureNodejsWorker.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptConsoleApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptWebApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptStarterExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptAzureStarterExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptAzureWebApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptAzureExpressApp.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptFromExistingCode.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ProjectTemplates\TypeScript\Node.js\1033\TypeScriptAzureNodejsWorker.zip
1>  Nodejs -> C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\TapeUnitTest.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\TypeScriptTapeUnitTest.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\MochaUnitTest.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\TypeScriptMochaUnitTest.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\UnitTest.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\TypeScriptUnitTest.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\JavaScript\DockerfileTemplate.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\CloudService\NETFramework4\Web Role\Node.js\CloudServiceWebRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\CloudService\NETFramework4\Web Role\Node.js\CloudServiceTypeScriptWebRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\CloudService\NETFramework4\Web Role\Node.js\CloudServiceExpressWebRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\CloudService\NETFramework4\Web Role\Node.js\CloudServiceTypeScriptExpressWebRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\CloudService\NETFramework4\Worker Role\Node.js\CloudServiceTypeScriptWorkerRole.zip;C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\ItemTemplates\CloudService\NETFramework4\Worker Role\Node.js\CloudServiceWorkerRole.zip
1>  Nodejs -> C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Nodejs\Microsoft.NodejsTools.dll
1>          1 file(s) copied.
5>------ Build started: Project: Profiling, Configuration: Debug x86 ------
6>------ Build started: Project: NodejsTests, Configuration: Debug x86 ------
7>------ Build started: Project: Nodejs.Tests.UI, Configuration: Debug x86 ------
8>------ Build started: Project: AzurePublishing.Tests.UI, Configuration: Debug x86 ------
7>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
7>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found
7>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found
8>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
8>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found
8>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found
6>  Restoring NuGet packages...
6>  To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
6>  All packages listed in packages.config are already installed.
6>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found
5>  Profiling -> 
5>  Profiling -> 
5>  Profiling -> C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Binaries\Profiling\Microsoft.NodejsTools.Profiling.dll
5>  Creating intermediate PkgDef file.
9>------ Build started: Project: ProfilerTests, Configuration: Debug x86 ------
10>------ Build started: Project: ProfilerUITests, Configuration: Debug x86 ------
10>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
10>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.dll' could not be found
10>CSC : error CS0006: Metadata file 'C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\TestUtilities.UI.Nodejs.dll' could not be found
9>  ProfilerTests -> C:\Users\austi_000\Documents\nodejstools\BuildOutput\Debug14.0\Tests\ProfilerTests.dll
========== Build: 3 succeeded, 7 failed, 17 up-to-date, 0 skipped ==========

When checking for the files being referenced in the errors, I seem to find almost-matching files, except for some reason they seem to be missing the .UI. portion of their file names. I'll instead find a file named "TestUtilities.Nodejs.dll", for example.

Thanks!

@mjbvz
Copy link
Contributor

mjbvz commented Jul 27, 2016

The initial error seems to be:

2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudioTools.VSTestHost.14.0, Version=14.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Did you run the EnvironmentSetup.ps1 -vstarget "14.0" script? This should install the vstest host assemblies. You can also manually run the msi found in: nodejstools / Common / Tests / Prerequisites / VSTestHost.msi.


Those errors are in the test projects thought and shouldn't prevent you from building and running NTVS itself through visual studio. Is anything blocking you from doing that currently?

@AustinHull
Copy link
Contributor Author

AustinHull commented Jul 27, 2016

Ah, looks like executing the VSTestHost.msi installer did the trick! My builds are now yielding 27 successes with 0 failures. Thank you again for taking the time to walk me through that, I greatly appreciate it! Now I'm presuming I can run this build by switching the solution to Release mode, building that, and then running a sort of installer just like I did through the build yielded by AppVeyor?

@mjbvz
Copy link
Contributor

mjbvz commented Jul 27, 2016

Good to hear that worked.

You should be able to build, launch, and debug NTVS all from within Visual Studio itself. In the nodejstools solution, make sure to set NodeJs as your startup project in VS ( https://msdn.microsoft.com/en-us/library/a1awth7y.aspx?f=255&MSPPError=-2147217396 ) by right clocking on the NodeJs project node and selecting "set as startup project". Then simply hit debug and VS will build NTVS and install in in an experimental Visual Studio Instance that you can debug.

Let me know if that works.

@AustinHull
Copy link
Contributor Author

AustinHull commented Jul 28, 2016

Yes, it seems to be working for me now, thank you!

I've also managed to determine, by manually creating a "FromExistingCode1" folder in the Projects directory, the wizard will then appropriately set the default name for the subsequent project as "FromExistingCode2". Unfortunately, even setting the "CreateNewFolder" tag of the FromExistingCode.vstemplate file doesn't seem to automatically create the project folder as I was hoping, so I'm going to have to look into that further.

Thank you again for all the help! I suppose you could close this PR if you'd like, since I'm still in the process of looking for a solution.

@mjbvz
Copy link
Contributor

mjbvz commented Jul 28, 2016

Ok, I'm going to close this issue since, as I mentioned, you should start working off of the master branch instead of the lightweight install branch.

I recommend started with at NewProjectFromExistingWizard and ImportWizardCommand to debug new project creation. Let me know if you are blocked by anything or could use any additional pointers.

@mjbvz mjbvz closed this Jul 28, 2016
@AustinHull AustinHull deleted the lightweight-install branch July 28, 2016 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants