When I am trying to launch VS 2017, is throwing some missing package error stating "Something went wrong".
Error Log:
[2544:0006][2018-06-01T11:21:08] Error 0x80131500: The dependent
package of
'Microsoft.VisualStudio.Product.Enterprise,version=15.7.27703.2018'
cannot be found:
Component.Redgate.SQLPrompt.VsPackage,version=9.1.12.5083. at
Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.FindDependentPackages(Dependency
dependency, DependencyComparer comparer, Dictionary2 packageIndex,
IPackage holder) at
Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraphRecursive(IPackage
graphRoot, DependencyNode node, DependencyComparer comparer,
Dictionary2 packageIndex, Dictionary2 nodeIndex, Boolean splitNodes)
at
Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraphCore(IPackage
root, IEnumerable1 packages, DependencyComparer comparer,
Dictionary2 packageIndex, Dictionary2 nodeIndex, Boolean splitNodes,
DependencyCollection deprecated) at
Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraph(IPackage
root, IEnumerable`1 packages, Boolean isUpdate,
IDependencyComparisonSeed seed, DependencyCollection deprecated) at
Microsoft.VisualStudio.Setup.Engine.GetDependencyGraph(Product
product) at
Microsoft.VisualStudio.Setup.Engine.TryBuildDependencyGraph(Product
product, Exception& error, Boolean overwrite, ITelemetryOperation
telemetryOperation) [2544:0006][2018-06-01T11:21:08] Error 0x80131500:
The dependent package of
'Microsoft.VisualStudio.Product.Enterprise,version=15.7.27703.2018'
cannot be found:
Component.Redgate.SQLPrompt.VsPackage,version=9.1.12.5083. at
Microsoft.VisualStudio.Setup.Engine.CreateInstallOperation(Product
product, String destination, ExecuteAction action, ITelemetryOperation
telemetryOperation) at
Microsoft.VisualStudio.Setup.Engine.Repair(CancellationToken token)
T wasn't able to launch or Repair but after a long and exhausted research, I silly thing worked for me.
I choose to modify option and then again modify to repair selected packages. Once Done everything looks good.
Related
I have followed the instructions at https://www.preemptive.com/dotfuscator/ce/docs/help/getting_started_xamarin.html#setup-targets and verified the accuracy multiple times. It says the first build will create DotfuscatorConfig.xml but it fails with Error 1. Then it says to set verbosity to Normal, so I did, but still no revelation why it won't create the file. I can change the build back to Debug and it builds fine, but changing back to release produces the same two errors. Has anyone experienced this and solved it?
Severity Code Description Project File Line Suppression State
Error The command ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscator.exe" /p:InDir="obj\Release\100\DotfuscatorXamarin\dfin",OutDir="obj\Release\100\DotfuscatorXamarin\dfout",ReportDir="DotfuscatorReports\Release" "obj\Release\100\DotfuscatorXamarin\Template.dfconfig" /in:+"${configdir}${InDir}\WetYourWhistle.Android.dll",+"${configdir}${InDir}\WetYourWhistle.dll" /makeconfig:"DotfuscatorConfig.xml"" exited with code 1. WetYourWhistle.Android C:\Users\leuol\source\repos\WetYourWhistle\PreEmptive.Dotfuscator.Xamarin\PreEmptive.Dotfuscator.Xamarin.targets 508
Severity Code Description Project File Line Suppression State
Error The "_DotfuscatorXamarin_SetProjectPropsTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'C:\Users\leuol\source\repos\WetYourWhistle\WetYourWhistle\WetYourWhistle.Android\DotfuscatorConfig.xml'.
File name: 'C:\Users\leuol\source\repos\WetYourWhistle\WetYourWhistle\WetYourWhistle.Android\DotfuscatorConfig.xml'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.FinishInitUriString()
at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri)
at InlineCode._DotfuscatorXamarin_SetProjectPropsTask.Execute() in c:\Users\leuol\AppData\Local\Temp\r0wqtkdr\r0wqtkdr.0.cs:line 93
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() WetYourWhistle.Android C:\Users\leuol\source\repos\WetYourWhistle\PreEmptive.Dotfuscator.Xamarin\PreEmptive.Dotfuscator.Xamarin.targets 520
Error The command ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscator.exe" /p:InDir="obj\Release\100\DotfuscatorXamarin\dfin",OutDir="obj\Release\100\DotfuscatorXamarin\dfout",ReportDir="DotfuscatorReports\Release" "obj\Release\100\DotfuscatorXamarin\Template.dfconfig" /in:+"${configdir}${InDir}\WetYourWhistle.Android.dll",+"${configdir}${InDir}\WetYourWhistle.dll" /makeconfig:"DotfuscatorConfig.xml"" exited with code 1. WetYourWhistle.Android C:\Users\leuol\source\repos\WetYourWhistle\PreEmptive.Dotfuscator.Xamarin\PreEmptive.Dotfuscator.Xamarin.targets 508
UPDATE - Now the code is compiling without error but still will not produce the DotfuscatorConfig.xml file. Not sure what else to try and it appears that nobody else knows either.
The solution is to temporary change the command dotfuscator.exe to dotfuscatorUI.exe :
<PropertyGroup>
<DotfuscatorXamarinConfigFileName>DotfuscatorConfig.xml</DotfuscatorXamarinConfigFileNam
<DotfuscatorXamarinCliPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscatorUI.exe</DotfuscatorXamarinCliPath>
<DotfuscatorGenerateConfigFileIfMissing>true</DotfuscatorGenerateConfigFileIfMissing>
<DotfuscatorEnabled>true</DotfuscatorEnabled>
<DotfuscatorXamarinEnabled Condition="'$(Configuration)' == 'Release'">true</DotfuscatorXamarinEnabled>
</PropertyGroup>
<Import Project="../../PreEmptive.Dotfuscator.Xamarin/PreEmptive.Dotfuscator.Xamarin.targets" />
Then start build. The dotfuscator UI starts with a window:
Show Image
Then press "Build". After it finishes, close then window by clicking "x" on top right. Then the output on Visual Studio shows a successful result:
Build started: Project: [AppName].Android, Configuration: Release Any CPU ------
[AppName].Android -> D:\Users\[UserName]\source\repos\[FolderName]\[AppName]\[AppName].Android\bin\Release\[AppName].Android.dll
Running Dotfuscator with a new config file based on project references...
Finished running Dotfuscator with a new config file.
D:\Users\[UserName]\source\repos\[FolderName]\[AppName]\[AppName].Android\[AppName].Android.csproj : warning : A new Dotfuscator config file was generated because it did not exist: 'DotfuscatorConfig.xml'.
You can see dotfuscatorconfig.xml is created at a folder [AppName].Android.
Then revert back from dotfuscatorUI.exe to dotfuscator.exe .
<PropertyGroup>
<DotfuscatorXamarinConfigFileName>DotfuscatorConfig.xml</DotfuscatorXamarinConfigFileNam
<DotfuscatorXamarinCliPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscator.exe</DotfuscatorXamarinCliPath>
<DotfuscatorGenerateConfigFileIfMissing>true</DotfuscatorGenerateConfigFileIfMissing>
<DotfuscatorEnabled>true</DotfuscatorEnabled>
<DotfuscatorXamarinEnabled Condition="'$(Configuration)' == 'Release'">true</DotfuscatorXamarinEnabled>
</PropertyGroup>
<Import Project="../../PreEmptive.Dotfuscator.Xamarin/PreEmptive.Dotfuscator.Xamarin.targets" />
Then the build should work without a UI popup.
I have a solution in Visual Studio 2013 which contains a SQL Server Database Project and I have recently added a Unit Test Project which has 136 tests in it. In Test Explorer, when I click on Run All to execute all of the tests, I receive the following error:
04018: The "SqlBuildTask" task failed unexpectedly.
System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String, System.Collections.Generic.Dictionary`2)' to access method 'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)' failed.
at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(String filePath, Dictionary`2 referenceMetadata)
at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.CreateCustomSchemaData(String filePath, Dictionary`2 referenceMetadata)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.ProcessReferences(TaskLoggingHelper providedLogger, SqlTaskHost host, ErrorManager errors)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.LoadImpl(ITaskHost providedHost, TaskLoggingHelper providedLogger)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.Load(ITaskHost providedHost, TaskLoggingHelper providedLogger)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteLoadTaskHostStep()
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func`1 step)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()
This should be fixed by installing the latest version of SSDT, available here: https://msdn.microsoft.com/en-us/dn864412
If the latest version of SSDT is already installed, try a repair installation.
I've got a websharper project that runs flawlessly on windows. However it only compiles flawlessly on mac but can't be run. The webserver complains that it can find a file (doesn't name it) and reading the stacktrace it seems to be the C# compiler complaining. However being an F# project that's somewhat surprising.
System.SystemException
Error running mcs: Cannot find the specified file
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.
Exception stack trace:
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00135] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:216
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00011] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:136
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00014] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs:111
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x002e8] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:822
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:731
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00264] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:826
at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x0011c] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:451
at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00056] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:396
at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00040] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:989
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:972
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x0016b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs:417
ANy suggestions to what could be the root of this problem?
Seems like a mono installation issue. A similar exception is happening in this ticket: https://forums.xamarin.com/discussion/50713/error-running-mcs-cannot-find-the-specified-file
Upgrading to mono 4.2 alpha resolves the issue. I do however think it can be solved with 4.0 as well since I have had the same web site running on a different Mac without installing 4.2
I'm using VS2013, Xamarin.Android 4.12.4.20.
Build is successful.
I'm getting error from title whenever I try to deploy in debug mode or package.
It started to happened today it work fine before.
I've restarted VS, device, PC - none helped.
Stack trace:
Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Mono.AndroidTools.Adb.AdbSyncDirectory.Add(AdbSyncItem entry)
at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String destinationPath, CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.FastDev()
at Xamarin.AndroidTools.AndroidDeploySession.Run(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken token)
Build output:
3>Build succeeded.
3>Waiting for device..
3>Detecting installed packages
3>Detecting installed packages...
3>
3>Removing previous version of application
3>Removing previous version of application...
3>
3>Installing application on device
3>Copying application to device...
3>
3>Getting installation path...
I've figured it out. Make sure that you don't have different versions of the same dll referenced!!
Let me describe my set up a bit more that will help with explaining why exception happened.
I've got two projects
Domain - library with code shared between all platforms
Android - android specific code
Both have nuget references to the same library. At some point android (only in this project) nuget references have been updated which resulted in two versions of the same library required by the application (Domain project still referenced old nuget).
When I tried to package solution I would get warning like :
Consider app.config remapping of assembly "{Library}" from Version "5.6.0.0" [] to Version "5.6.1.0" [{Path}] to solve conflict and get rid of warning.
Once I've update Domain's nuget everything worked.
First up, great library!
If I compile, then move the assemblies when I verify it still looks for the *.approved.txt in the location it was compiled in, which in my case no longer exists.
I'm running into this issue on Teamcity where we build and test in separate tasks.
So the build step will build in c:\BuildAgent\SomeGuid...
I take the artifacts from the build and run the tests in c:\BuildAgent\SomeOtherGuid...
This fails as Approvals.Verify still references "SomeGuid"
[Fact]
public void ShouldCreateCorrectOutgoingFiles() {
var textToVerfiy = "Here's some text To Verify";
Approvals.Verify(textToVerfiy);
}
...
: System.IO.DirectoryNotFoundException : Could not find a part of the path 'r:\w\254cbbd5ec9b56bc\project\ScenarioTests\myTests'.
Stack Trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at System.IO.Directory.CreateDirectory(String path)
at ApprovalTests.ApprovalTextWriter.WriteReceivedFile(String received)
at ApprovalTests.Approvers.FileApprover.Approve()
at ApprovalTests.Core.Approvals.Verify(IApprovalApprover approver, IApprovalFailureReporter reporter)
at ApprovalTests.Approvals.Verify(IApprovalWriter writer, IApprovalNamer namer, IApprovalFailureReporter reporter)
at ApprovalTests.Approvals.Verify(IApprovalWriter writer)
at ApprovalTests.Approvals.Verify(String text)
Any ideas on how I can tweak it to look in relative directory to executable.
You have to write a custom namer. It's pretty easy. Take a look at these files.
http://bit.ly/IApprovalNamer
http://bit.ly/XUnitStackTraceParser
http://bit.ly/AttributeStackTraceParser
Once you do that, you'll have to register the namer for use, to do that simply call.
Approvals.RegisterDefaultNamerCreation(()=> new MyCustomNamer());