The install of solidity extension was failed for Visual Studio 2017 - visual-studio-2017

I tried to install solidity extension for Visual Studio 2017, I downloaded VSIX Installer from the link bellow:
https://marketplace.visualstudio.com/items?itemName=ConsenSys.Solidity
when I tried to run the VSIX file, the installation failed immediately with the given message:
"Install Failed
The install of the extension was not successful for all the selected products. For more information, click the install log link at the bottom of the dialog.
This extension is not installable on any currently installed products."
I also tried to read the log file but it is very huge and many different things happened there. I appreciate if someone who had the same experience and fixed it could advice me how to fix it.

For anyone who is trying to install on VS 2017 just open the extract the package and then edit the extension.vsixmanifest to change the wrongly added brackets to square brackets. As below:
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Community" />
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Enterprise" />

If still you face issue, With out converting to .zip file, do " Open Archive " - With in that edit the files as below
<Installation>
.... Version="[14.0,15.0]"
.... Version="[14.0,15.0]"
.... Version="[14.0,15.0]"
</Installation>
<Dependencies>
.... Version="[4.5,]"
</Dependencies>
save the file and run as it. ( Here there is no conversion from vsix to zip and back - edit is direct on the vsix ) - Installation is success for me.

The page says "Works with Visual Studio 2015".

Related

PowerBI Visuals Tools - error after pbiviz start command

I trying to start my custom visual (like usually) but after I updated powerbi-custom-visual to version beta 3.0.11 from version 3.0.10 I got the following error:
error ENOENT: no such file or directory, open '/Users/mar/CustomVisuals/rangechart/.tmp/precompile/visualPlugin.ts'
(node:1454) UnhandledPromiseRejectionWarning: Error: Failed to generate visualPlugin.ts
at generateVisualPlugin.then.catch.ex (/usr/local/lib/node_modules/powerbi-visuals-tools/node_modules/powerbi-visuals-webpack-plugin/index.js:168:12)
at <anonymous>
Does anyone knows why is that? I returned back to the previous beta version of powerbi-custom-visual but it did not help. With version 2.3.0 everything works fine.
I ran into something similar after I deleted the .tmp folder in my project to clean up from an old build. I found that I had to manually (re)create the .tmp/precompile directories inside my project folder. Not sure why the tool couldn't handle creating them itself.

How to accept android licenses after installing Tools for Cordova using Visual Studio 2017

I installed Visual Studio 2017 with the "Mobile development with JavaScript" option and "Android SDK setup" selected.
When I check Tools->Options->Tools for Apache Cordova->Environment Variable Overrides I can see that ANDROID_HOME has been set to "C:\ProgramData\Microsoft\AndroidSDK\25"
When I try to build my project I get an error:
cordova-build error : > You have not accepted the license agreements
of the following SDK components: cordova-build error : [Android SDK
Platform 25].
I open a Windows command prompt and go to the directory containing the sdkmanager:
cd C:\ProgramData\Microsoft\AndroidSDK\25\tools\bin
I try sdkmanager --licenses but that results in
Error: Unknown argument --licenses
So I try sdkmanager --update and that results in
Warning: An error occurred during installation: Failed to move away or
delete existing target file:
C:\ProgramData\Microsoft\AndroidSDK\25\tools Move it away manually and
try again.
So I move up to the folder above the tools folder and rename it:
ren tools tools.old
then try the update again:
tools.old\bin\sdkmanager --update
this gave me a warning:
Warning: Observed package id 'tools' in inconsistent location
'C:\ProgramData\Microsoft\AndroidSDK\25\tools.old' (Expected
'C:\ProgramData\Microsoft\AndroidSDK\25\tools')
But after a lengthy wait the command reported that it was done and I could see that there was a new "tools" folder.
I tried to build my project again. Now my error is:
Could not find gradle wrapper within Android SDK. Might need to update
your Android SDK.
Looked here:
C:\ProgramData\Microsoft\AndroidSDK\25\tools\templates\gradle\wrapper
References:
https://stackoverflow.com/a/47305199/150342
https://developer.android.com/studio/command-line/sdkmanager.html
You have not accepted the license agreements of the following SDK components

Could not load file or assembly System.Reflection.TypeExtensions

I got below exception while running xunit test projects which works under VS 2017 15.3
[2017/12/4 23:08:40 Error] [xUnit.net 00:00:00.0033291] xxx.Test: Catastrophic failure: System.TypeInitializationException: The type initializer for 'Xunit.DiaSession' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Xunit.DiaSession..cctor()
--- End of inner exception stack trace ---
at Xunit.DiaSession..ctor(String assemblyFileName)
at Xunit.DiaSessionWrapper..ctor(String assemblyFilename)
at Xunit.XunitFrontController..ctor(AppDomainSupport appDomainSupport, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, ISourceInformationProvider sourceInformationProvider, IMessageSink diagnosticMessageSink)
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.RunTestsInAssembly(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, IMessageSinkWithTypes reporterMessageHandler, AssemblyRunInfo runInfo)
My current VS 2017 version is 15.4.5.
I have tried the work around which has been provided previously, but none did not work. And I have try to downgrade my VS 2016 to 15.3, but I could not find the 15.3 package to install. I have tried to install xunit to latest version.
Any help would be appreciated.
Update:
Project Type:xUnit Test Project(.NET Core)
Target: net 461
It seems VS 2017 fail to load specific "xunit.runner.visualstudio", after checking VS2017 15.4.2 - Unable to run tests for projects targeting .NET Framework 4.6.x #1542 again, I deleted the "%TEMP%\VisualStudioTestExplorerExtensions", create a new Xunit project, change the nonworked.csproj xunit.runner.visualstudio from 2.2.0 to 2.3.1, it works now. Not sure why it did not work when I try it previous.
Hope it will help others.
You need to install System.Reflection.TypeExtensions using VS Package Manager using the following command:
Install-Package System.Reflection.TypeExtensions -Version 4.5.1
for more information please review the following link
System.Reflection.TypeExtensions

nuget restore failing in team services build

I have 2 local assemblies referenced via nuget (packed the dll's up) using vs2017 on a asp.net core solution, builds fine locally.
Now trying to generate a build via VSTS i am getting the following error,
Detected NuGet version 4.0.0.2283 / 4.0.0
SYSTEMVSSCONNECTION exists true
Saving NuGet.config to a temporary config file.
d:\a\_tool\NuGet\4.0.0\x64\nuget.exe restore d:\a\1\s\TestFrameworkCoreAPI.sln -Verbosity Detailed -NonInteractive -ConfigFile d:\a\1\Nuget\tempNuGet_37.config
NuGet Version: 4.0.0.2283
MSBuild auto-detection: using msbuild version '15.3.409.57025' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\msbuild.exe /t:GenerateRestoreGraphFile /nologo /nr:false /p:RestoreUseCustomAfterTargets=true /p:BuildProjectReferences=false /v:q /p:NuGetRestoreTargets="d:\a\_temp\NuGet-Scratch\w53qa5rr.4sd.targets" /p:RestoreTaskAssemblyFile="d:\a\_tool\NuGet\4.0.0\x64\nuget.exe" /p:RestoreGraphOutputPath="d:\a\_temp\NuGet-Scratch\4mlmlfgh.mmy.result" /p:ExcludeRestorePackageImports=true /p:RestoreRecursive=False /p:RestoreProjectFilterMode=exclusionlist /p:RestoreContinueOnError=WarnAndContinue /p:RestoreGraphProjectInput="d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj;" "d:\a\_temp\NuGet-Scratch\w53qa5rr.4sd.targets"
Running restore with 2 concurrent jobs.
Reading project file d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj.
Reading project file d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj.
Restoring packages for d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj...
Restoring packages for d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj...
Restoring packages for .NETCoreApp,Version=v1.1...
Restoring packages for .NETCoreApp,Version=v2.0...
System.AggregateException: One or more errors occurred. ---> NuGet.Protocol.Core.Types.FatalProtocolException: Failed to retrieve information about 'Microsoft.VisualStudio.Web.CodeGeneration.Tools' from remote source 'D:\TestFrameworkAssemblies'.
at NuGet.Protocol.LocalV3FindPackageByIdResource.GetVersionsCore(String id, ILogger logger)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at NuGet.Protocol.LocalV3FindPackageByIdResource.GetAllVersionsAsync(String id, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
at NuGet.Commands.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Error: d:\a\_tool\NuGet\4.0.0\x64\nuget.exe failed with return code: 1
Packages failed to restore
I have a nuget.config file in a .nuget folder located in the root of solution,
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- remove any machine-wide sources with <clear/> -->
<clear />
<add key="Test Framework" value="D:\TestFrameworkAssemblies" />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
This is what is in the VSTS build def, NuGet restore step
It looks like it always references my local assembly and not the standard nuget.org, now in the config file, if i take out my local entry to framework assemblies, the nuget part works but i get a primary reference error as it cannot find the 2 assemblies i have packed locally.
Been going round in circles with this at the moment, how can you get VSTS to restore local packed assemblies as well as from nuget.org. I am using Hosted 2017 as well.
thanks in advance
It seems you were queue the build on Hosted agent. Since there has the packages located on your local machine, you should build with the private agent which located on your local machine.
Additional, if you need to queue the build on Hosted agent, you should add the local packages in repository, and then reference the packages with the new path and change the value in nuget.config.

Unable to install exenstions and updates for Visual Studio 2017 RC (15.0.26014.0)

I recently installed Visual Studio 2017 RC (15.0.26014.0) and was trying to install extensions. However while installing any extension using Tools->Extensions and Updates menu fails. Following is installation log.
27-Dec-16 10:35:19 AM - Beginning to install extension to Microsoft Visual Studio Enterprise 2017 RC...
27-Dec-16 10:35:19 AM - Install Error : System.IO.FileNotFoundException: Unable to find the specified file.
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.GetCurrentSetupInstance()
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, IInstalledExtension& newExtension)
Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal (InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar,
IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)
I checked and found corresponding VSIX file is present in temp folder (C:\Users\xxxxx\AppData\Local\Temp)
I'm currently having the same problems. According to this post, repairing the installation might help.