Visual Studio 2017 - Not Able to see Publish Profiles - visual-studio-2017

In my VS 2017, my publish profile is not being listed in the publish section of the VS 2017.
I can run the application with no error but I can't publish it or see and log file saying any error about when I do right click the project and click on publish. And also even if I wanted to create new profile VS just doesn't open create new profile window.
Any guess what might be causing this?

Just like #MikeB said, I checked that with XML validators on the web but then realized the problem was that I was using invalid XML tag and XML attributes in .pubxml after using the correct one problem was solved!
Check whether you are using your XML node and attributes correctly!

I've recently encountered this problem in VS 2019 with a project whose .pubxml profiles had been working fine and have not changed for quite a while.
The problem turned out to be a corrupted .pubxml.user file that was preventing VS from loading any profiles. The .pubxml.user files exist in the same directory as the .pubxml file and deleting them solved the issue for me.

I had the same issue. One of the .pubxml has conflict, after resolving the conflict(SVN) it worked.

Related

Error when trying to create a new empty controller: 'Sequence contains no matching element'

SOLVED?: I had originally changed the directory of the new project from the default (which is inside users -> yourusername -> source -> repos) to my desktop. Moving the folder back into the repos solved the issue + I ran Visual Studio 2017 as an admin also. I'm not gonna pretend to know why these solved the issue, so if anybody could enlighten me, I would really appreciate it.
I'm following a UDemy course: ASP.NET CORE MVC 2.0, and i'm using Visual Studio Community 15.8.1
When I right click the controllers folder and click add new controller, then click add new empty controller: The error I keep getting is: There was an error running the selected code generator: 'Sequence contains no matching element'
I was able to find 2 similar questions and solutions on the web. In both cases, there was some security software blocking some part of them building a new controller. But I'm not sure how to go about finding if my firewall is blocking some part of this process. Or maybe there is something else causing this.... Does anyone know the solution to this?
I had the same issue recently and found the problem was solved by running Visual Studio 2017 as Administrator.
Hope this helps if anyone else finds the problem.
Visual Studio 2019 and .net core 3.0
Uninstalled: Microsoft.VisualStudio.Web.CodeGeneration.Design Version: 3.1.0-preview3.19558.8
and Installed: Microsoft.VisualStudio.Web.CodeGeneration.Design Version: 3.0.0
Solved the issue for me.
simply downgrade Microsoft.VisualStudio.Web.CodeGeneration.Design to Version: 2.1.9,
this solution worked for me.

After opening website in VS2017 - Error Publishing Customization

I am relatively new to Acumatica. I have been following the Development series of training videos and hit a hard stop on T300 video 4 after opening the website in Visual Studio and then trying to publish the changes in my customization project (after detecting/updating changed files).
Error:
The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.
My environment is pretty simple:
Acumatica ERP 2018R1
Visual Studio Community Edition
Windows 10 Pro build 1803
I found a number of posts suggesting that I install a nuget package, which may or may not have helped but did not fix the problem. (Microsoft.CodeDom.Providers.DotNetCompilerPlatform)
I stumbled across a reference to the node_modules folder (sorry, lost that post link) which prompted me to check my TST vs DEV instances, and I found it does not exist in my TST instance. I also then noticed that the error I received during publishing happens after a series of lines about node_modules.
After a little more digging, I found https://stackoverflow.com/a/43494775 which seems to have stopped the node_modules folder from being created and appears to have solved my problem publishing inside of Acumatica.
Other posts for visual studio claimed that the issue comes from the C++ compiler not being included in GAC in VS2017, but I completed the T100 and T200 courses on VS2017 without any issue. The problem seems to be connected specifically to opening the Acumatica Website in VS2017.
Does anyone have any experience with this issue that can confirm disabling NPM restores won't cause me headaches down the road? Or is there a better solution? I don't recall anything in the setup guides telling me to make this change, and I haven't found any references that this was an issue before VS2017.
I do recall running into this in older version of 2018R1.
These posts helped me solve the issue:
This post solved it for me:
How can I disable NPM package restore in Visual Studio 2015?
Also with help from this post:
Getting File Path error while adding file to files list in Customization Manager
if you still have the node_modules related folder just delete it and you should be good (from what I can remember).
If these don't work try the latest 2018R1 build. (or at least 2018R1 Update 1)

Visual Studio IDE error - Cannot access a disposed object

I'm getting the following error when trying to open any .cs file in my solution.
I've tried 1) restarting Visual Studio, 2) restarting computer, 3) delete all obj folders, 4) delete all .vs files and folders and still I can't open any files.
Same error message if I double click on the file in solution explorer or use F7.
The files do exist.
I've also tried disabling resharper in case it was that causing the issues, but it doesn't help.
I've also tried navigating to classes using Ctrl+T, entering class name and selecting the class. No error messages, but nothing loads.
This is the error I got when I tried to open an old solution: Cannot access a disposed object. Object name: 'WorkspaceContext'. I found the solution from Refat Eid's blog.
You just need to open the following directory and delete the content there:
%LocalAppData%\Microsoft\Team Foundation\7.0\Cache
Depending on your Visual Studio, you may have a different version number in your %LocalAppData%\Microsoft\Team Foundation. If you are not sure, copy the content to a temp folder first.
Other answers, either upgrading or reinstalling, basically serve the same purpose.
The problem here was that my solution folder was inside my OneDrive folder, which was doing automatic syncing with my OneDrive account.
Moving the solution folders out of the one drive folder made the errors go away.
I have the same issue but in Visual Studio 2019 Community Edition latest update which is Version 16.7.2.
After the update, all of my solutions that was bound in Azure Devops were experiencing problems when I try to checkin with the same error message as OP.
So, I deleted the folder but instead of:
%LocalAppData%\Microsoft\Team Foundation\7.0\Cache
I deleted this instead:
%LocalAppData%\Microsoft\Team Foundation\8.0\Cache
Then re-open my solution and it will rebind automatically after this message box:
In case it didn't rebind. Try to re-open your solution via Team Explorer -> Source Control Explorer and double click the solution directly on the Source Control Explorer.
In my case it was solved by simply restarting the visual studio.
I solved this problem, by re-downloading the vs installer (i apparently deleted my old copy), and telling it to run an update as well.
This is insane. Why should OneDrive synchronization cause this problem?
My Windows 10 system just installed a bunch of new updates today (4/11/2018). Immediately after those updates were installed I was unable to open any of my C# files in VS 2017 (error: Cannot access disposed object). All of these files opened without problem prior to today's updates.
Moving the projects off OneDrive solved the problem, as did opening the files in a previous version of VS (I tried VS 2015).
All of my VS projects are stored on OneDrive, with copies on my local drive. OneDrive claims that all my files are up to date, so I don't understand how this can be related to OneDrive synchronization.
Has anyone else suddenly run into this problem?
In my case, I have the solution file and its folder under OneDrive sync folder. Right click OneDrive system tray and click Settings. Under the Settings tab, uncheck Save space and download files as you use them checkbox (Files On-Demand)
I had the same issue, however after I upgraded to the latest version of Visual Studio 2017 (15.6.7), the error message disappeared, so I could open all files in the solution again. Hope this helps.
In my case this was due to deleting solution configurations which were not immediately saved, just saving all and restarting Visual Studio solved the problem.
In my VS2019. Closed VS. Disable Sync of One Drive Files, and reload project. Problem gone! It definitely seems somewhat related to OneDrive. Even though in my case all files were Sync'ed still pausing it and re-opening VS resolved. It could have been just restart of VS...
I had the same error. My solution is not stored in onedrive, but locally.
the full error message was :
error performing rename. cannot access a disposed object. object name invisibleEditor
the error happened when I renamed first the file from the solution-explorer window then clikced yes, which normally changes the class name as well, however this did not happen.
then when i tried to change the class name the error was thrown.
I restarted VS 2019 Enterprise 16.11.3 few times but that did not help.
I resolved this by:
undoing the renaming of the file in the solution explorer
deleting the .vs folder in my solution directory
deleting all the bin and obj folders in on my projects within then solution.
the renaming was then successful.
the error stack was :
System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'InvisibleEditor'.
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.InvisibleEditor.get_TextBuffer()
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioWorkspaceImpl.ApplyTextDocumentChange(DocumentId documentId,SourceText newText)
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioWorkspaceImpl.ApplyDocumentTextChanged(DocumentId documentId,SourceText newText)
at Microsoft.CodeAnalysis.Workspace.ApplyChangedDocument(ProjectChanges projectChanges,DocumentId documentId)
at Microsoft.CodeAnalysis.Workspace.ApplyProjectChanges(ProjectChanges projectChanges)
at Microsoft.CodeAnalysis.Workspace.TryApplyChanges(Solution newSolution,IProgressTracker progressTracker)
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioWorkspaceImpl.TryApplyChanges(Solution newSolution,IProgressTracker progressTracker)
at Microsoft.CodeAnalysis.Workspace.TryApplyChanges(Solution newSolution)
at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.InlineRenameSession.ApplyRename(Solution newSolution,IWaitContext waitContext)
at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.InlineRenameSession.CommitCore(IWaitContext waitContext,Boolean previewChanges)
at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.InlineRenameSession.<>c__DisplayClass78_0.b__0(IWaitContext waitContext)
at Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitIndicator.Wait(String title,String message,Boolean allowCancel,Boolean showProgress,Action`1 action)
at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.InlineRenameSession.CommitWorker(Boolean previewChanges)
at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.Dashboard.Commit()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Newly created items are not added to the solution until I close and reopen it (VS2017)

This is slowly driving me crazy. It is a problem I did not have with VS2015 and only showed up when I started using VS2017. I have upgraded to the first service pack and that did not change anything.
It is a C# .NET Core project if that matters. Any time I create a new file (e.g. Foo.cs) it doesn't seem to get associated with the solution. If I try and reference it from an existing file then the IDE doesn't recognize it and it reports an error. Any open tabs I have with these files shows them as "Miscellaneous files" where it would normally have "ProjectName(netcoreapp1.1)".
If I close the solution and then reopen it then everything works fine. Building or rebuilding the solution does not fix the issue. Is anyone else seeing this problem?

Cannot add Custom Action in Visual Studio 2010 installer project

I converted a working project from Visual Studio 2008 to VS2010. The c++ solution builds a single executable and 3 DLLs, and a windows installer project.
After converting to VS2010, I received a build error "Unable to build custom action named 'Primary Output from xxxx (Active)' from project output group 'Primary Output' because the project output group does not have a key file."
I removed and re-added the output groups, then attempted to add a custom action. The executable output was not listed as a candidate for a custom action. I then noticed when I selected the executable "Primary Output" properties, that the "KeyOutput" property was set to (None) and was grayed out.
When revisiting the VS2008 version, the KeyOutput property was not grayed out. I found the error message on MSDN, with a useless fix:
"Remove the custom action and replace it with a custom action pointing to a project output group that has a key file."
Obviously the tech writer didn't know how to fix it either. Keep in mind the original build worked and installed correctly. I believe the root issue is why the KeyOutput property is disabled - but why? (When viewing "Outputs" it correctly shows the exe or dll in each project)
I had a similar problem and I figured out why the setup project could not find the key output files.
My project Output Directory was defined as $(SolutionDir)\bin\$(Platform). SolutionDir already has a trailing backslash so the \bin was placing a double backslash in the path. The project would build fine but the setup project couldn't resolve the key outputs. Setting the output to $(SolutionDir)bin\$(Platform)\ resolved the issue.
After further investigation, I found this is a bug in Visual Studio 2010.
If you specify an output name for a project that differs from the name of the project itself, it fails to do the right thing.
To reproduce this, change
Project properties->Linker->General->OutputFile from $(OutDir)$(TargetName)$(TargetExt) to be something like $(OutDir)foobar.exe
The project then changes the KeyOutput value to empty, and is not available for custom actions in installations. No workaround other than living with the default project naming convention.
Very late answer but hopefully it will save someone the 2 hours I spent banging my head on the wall with VS 2010 ( what an awful piece of software it is - slow to load and takes up 300 megs of working memory per devenv , and now this bug!!!!!????) here goes -
Roger Dunn was correct is saying that it is the Project properties->Linker->General->OutputFile that causes the problem - if you have something like $(OutDir)foobar.exe the custom action barfs , if you change it back to $(OutDir)$(TargetName)$(TargetExt) it works again!
The work around is to change the macro $(TargetName) to foobar and then user $(OutDir)$(TargetName)$(TargetExt) if you want custom name for your exe.
$(TargetName) can be changed at - Project properties->Configuration Properties->general->TargetName.
But what a waste of time this VS 2010.