Quantcast
Channel: Visual Studio General Questions forum
Viewing all 21115 articles
Browse latest View live

Intellisense not working on one project - VS2019

$
0
0

Hello,

I'm having issues with one specific project in VS2019. After upgrading from VS2017, I got the solution from the TFS.

Everything was working fine until I modified a file of this project. Intellisense stopped working.

It should be something related to this project file because if I modify other files in other projects from the same solution it keeps working fine.

What can I do to try to fix it?


Hugo


Problem opening an STMicro virtual serial port

$
0
0

I have an issue with opening an STMicro USB Virtual com port.

When I plug the device into my PC, the COM port appears as it should, and the Windows Device Manager indicates it is working properly.

I have a C# program on the PC which selects and opens this port.

However, in about 1 in 10 attempts, the PC program sticks on the port.open() command, and after about half a minute, returns with the error "The semaphore timeout period has expired".

I have written a tiny C# program that does nothing more than open the port. This still gives the behaviour noted.

    public partial class Form1 : Form
    {

        SerialPort port = new SerialPort();
        string portName = "COM1";  // give it a default to start with


        public Form1()
        {
            InitializeComponent();

            // Populate the com port selector combobox with available port names
            cmbPortSelect.Items.Clear();

            string[] activePorts = SerialPort.GetPortNames();
            foreach (string availablePort in activePorts)
            {
                cmbPortSelect.Items.Add(availablePort);
            }

            //declare the serial port
            port = new SerialPort(portName, 9600, Parity.None, 8, StopBits.One);
            port.ReadTimeout = 100;

        }

        private void cmbPortSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbPortSelect.SelectedIndex != -1)
            {   // it will get set to -1 (ie no selection) in the catch below - we do't want this selected item change to do anything
                if (port.IsOpen) port.Close();
                port.PortName = (string)cmbPortSelect.SelectedItem;
                System.Threading.Thread.Sleep(50);
                try
                {
                    port.Open();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                    cmbPortSelect.SelectedIndex = -1;  // clear the selected item box
                }
            }

        }
    }
If instead of using my C# program to open the port, I use the comms program PuTTY, it works every time.

In addition, if I plug in a device with an FDTI USB virtual com port, it also works every time.

I'm using Win7, with the STMicro VCP drivers ver 1.3.1, but the same behaviour occurs with Win10 and the generic Microsoft drivers, which STMicro recommend we use.

There is a version 1.5.1 drivers for Win7, but when I installed them, it reported that they had installed correctly, but the Device Manager still reported ver 1.3.1.

Has anyone noted any similar behaviour?

Thanks,
Steve

Microsoft Help View could not connect to http://services.mtps.microsoft.com/ServiceAPI/catalogs/VisualStudio11/en-US.

$
0
0

Microsoft Help View v2.0, v2.1, v2.2 could not connect to http://services . mtps . microsoft . com/ServiceAPI/catalogs/VisualStudio11/en-US. But v2.3 works fine. I tried from browser and the URL "http://services . mtps . microsoft . com/ServiceAPI/catalogs/VisualStudio11/en-US" worked in browser.

Error:

An error occurred while checking for updates: Microsoft.VisualStudio.Help.CacheLib.CacheLibWebConnectivityException: Unable to connect to services.mtps. Check your Internet connections. ---> System . Net . WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System . IO . IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System . Net . Sockets . SocketException: An existing connection was forcibly closed by the remote host

If I manually download all the cab files and then try to update I always get error "cab was not signed by Microsoft"

An error occurred while updating content on your computer: Microsoft.VisualStudio.Help.CacheLib.CacheLibNonMicrosoftSignatureException

Can Apache Spark cluster manager allocate task to executors of another server?

$
0
0

Hi,

I am newbie into apache spark . My application server is installed with apache spark 2.4.1. It is a windows OS based system. I have 3 linux servers with spark installed in them. 

I want my application server to scale in such a way that any request that comes to my application(IIS server) server should redirect the load on to the 3 linux servers.

So, spark driver(master) and cluster manager would start a spark session and initiate the spark executors of another server or virtual machine. Is it possible? If yes, please guide me the steps and process to achieve it. If no, what are the other options to achieve this objective, may be something similar to spark

Is MobiusAPI for .NET spark deprecated?

$
0
0

Hi,

In order to scale an application, I have to incorporate spark commands inside my .NET core built application. But, as far as I know, the MobiusAPI is deprecated . Is MobiusAPI needed for spark in .NET application? If yes, how to use spark in .NET application with MobiusAPI. If no, what is the alternative for MobiusAPI?

It would be really helpful if you provide some sample application code or documentation for the steps and process

Thanks

Setup project need framework 4.6.1

$
0
0

HELLO

Using visual studio 2019

I wrote a simple windows application project in vb.net  and created a setup project.

When i run the msi file that has been created i get this message 

But if i use an earlier version of visual studio like visual studio 10 and create a setup iencountered any problem 

So what the difference ?

 Thanks 

I try to add a database file to my project and am told it exists already

$
0
0

I copied a SQL SERVER MDF file to my app_data folder in my Visual Studio project and tried to connect, but got this error when the code opens the database connection.

System.Data.SqlClient.SqlException
  HResult=0x80131904
  Message=An attempt to attach an auto-named database for file 
C:\gideonwroteprograms2\EchoTheory\EchoTheory\bin\Debug\App_Data\EchoDatabase.mdf
failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

A possible clue:

A few weeks ago I tried to connect create the same database from within the server explorer window, and then run a script to populate its tables.   That did work, but since then I had to reinstall visual studio, and the program supposedly no longer finds that database, but when I put an MDF version in the app_data folder, maybe its finding somehow that old version and raising an error about duplication?   Or is there another problem?

Thanks

  

VS2019 making lots of temp folders in AppData\Local\Temp\ and running BackgroundDownload.exe from them

$
0
0

This is a problem with VS2019 (previous versions didn't do this), it's making many different folders (with random names) in the AppData Temp folder and whenever the PC is idle for a few minutes its running the BackgroundDownload.exe from resources/app/ServiceHub/Services subfolder.

Picture of the search "BackgroundDownload.exe" in the Temp folder:


The problem is:
1. each of those temp folder is ~160MB in size
2. I can't create the firewall rule for a program whose path is always changing.

Why is VS creating all these folders and how to prevent it?



License Transfer Visual Studio

$
0
0

Hi,

Our US office Team have purchase Visual Studio 2019 license from a retail and its not in use, now we from India have the requirement of Visual studio 2019 and can we use the US purchased license in India.

Thanks,

Don.j

Issue with Task

$
0
0

Hi,

I am using the following code with Form application under an async method.

var a = Task.Run(async () => await Get_iSeeLoc_Real_Locations()).Result;

I would expect the UI not to be in a deadlock during this line. TheGet_iSeeLoc_Real_Locations() is an async method as well.

I can also see in the thread window that not new thread was invoked.

Your help will be greatly appreciated.

Thanks
Sharon

How do you unload a Installer project

$
0
0

12/4/2019

Greetings:

I am using Visual Studio 2019.

I just installed "Microsoft Visual Studio Installer Projects" and updated my installer project from it original creation in VS 2017.

In my solution there are several projects including, dll's, exe's, and Web apps, and my installer project.

I can right click on any of the projects, with the exception of the installer project, in the 'Solution Explorer', and 'Unload' the project.

My question; Is there a way to unload the installer project without removing it from my solution?

I would like to build the solution without building the installer project, in most cases.

Thanks.

Visual Studio 2019 is so bad I have gone back to Visual Studio 2017

$
0
0

I recently upgraded to Visual Studio 2019 because I was excited about the new Intelli-Code and Live Code Share features. However I have had to go back to Visual Studio 2017 because:

  • The intelli-code is so slow that it is hindering my development and not helping it. Sometimes the drop-down never even appears and I have to backspace and then go back. I have reported this issue but have yet to see any improvement in the updates.
  • Randomly freezes doing the most benign actions and then sits there loading forever. Sometimes it just takes adding a new line.
  • The DevOps/Team Explorer has completely broken and will not allow me to check anything in no matter what I do. I have to load VS 2017 to check in my code.

I would say the only nice feature in VS 2019 is the faster load time. However, this only accounts for a very tiny percentage of the time I use VS 2019 so this is irrelevant to me. I would opt for a load time 3 times longer than have the other issues I have to deal with. 

I am mostly here to try and voice my feedback to the community and to the development team since this is the only way I found to do so. 

Is it possible to extend Visual Studio Code with custom data visualizers like in Visual Studio?

Visual Studio Installer - Setup project output file name

$
0
0

I am developing a Windows Forms Project including a Setup/deployment project.

Each time, I finish a new version, I
- rebuild and create *.msi file for install, fx pgm_7-0.msi - version 7.0
- save a copy of the project source code

Then I increase all version numbers:
- Assembly version to 7.1
- file version to 7.1
- publish version 7.1 (just in case)
- setup project version 7.1, upgrade productcode
- Setup project properties output file name to pgm_7-1.msi

This has worked fine for years - even through the project has lived in VS2008 -> VS2010 -> VS2013 and now VS2017

But as I went from 7.2 to 7.3 /7.4 it still produces a pgm_7-2.msi.

Looks like the output file name hangs in pgm_7-2.msi no matter what I do.

Any explanation ?

mvh  ravnø

Visual Studio 2017 .NET Core templates missing

$
0
0

Hello,

I tried almost all suggestions I found online in order to get the .NET Core templates to appear in my instance of VS 2017, but it's still not working.

I tried following all steps from here: https://www.microsoft.com/net/learn/get-started/windows

I can create a .NET application using the command-line but I want to have the templates in VS. 

All suggestions I found did not work. 

Cheers,

Costin 


How to create folder in visual studio 2015 online to check-In code.

$
0
0

I have a solution that has been broken down to something like this

---Dependencies

---Solution 

---Cleanbat

I want to create git repository that hold these as one solution so when another user get a clone, get everything. Any help will be appreciated.


Ebenezer

How to keep password secure with Publish Profile?

$
0
0

Hi! When i publish my ASP.NET Core application to Azure, i have to set connection string under "Apply this migration on publish". And i see that this connection string is kept in fileProjectName - Web Deploy.pubxml.user non-encrypted:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
<EncryptedPassword>AQAAANCMnd8BFdERjH ... MsEA4lyWyC</EncryptedPassword>
  </PropertyGroup>
  <ItemGroup>
    <EFMigrations Include="ProjectName.Data.ApplicationDbContext">
      <Value>Server=servername.database.windows.net%3bDatabase=db_name%3bUser Id=user_id%3bPassword=password</Value>
    </EFMigrations>
  </ItemGroup>
</Project>

Password for publishing is encrypted. Connection string for applying migration is non-encrypted. How to resolve this? Maybe, i make some mistake?

File ProjectName - Web Deploy.pubxml.user is excluded from GIT (has to be because of extension), but it is not normal to keep password of production database in a plain view.


How to add/remove file from compilation in a C++ project depending on the current configuration

$
0
0

Hello! I'm trying to setup a project with two configurations:

  • One for tests (Tests)
  • Another one for debug (Debug)

In the Tests configuration I want the file tests.cpp that contains the main function that runs the tests from Google Test to be compiled, but I want this file to be excluded from compilation in the Debug config.

In the Debug configuration, I want the file main.cpp that contains the main function of the application to be compiled, but I want this file to be excluded in the Tests config.

If this works, I wont have any problems of "redefinition of main", but I'm having this problem right now because I cant exclude/include these files (by switching to the appropriate Configuration and right clicking on the file in the Solution Explorer window and then clicking in "Include in Project" or "Exclude from Project") for a single configuration. Everytime I try to include/exclude these files, this setting seems to be applied to all the configurations of the project.

Am I missing something here?

Thanks in advance for your help

PS: I'm using Visual Studio 2019 with VisualGDB



Can not compile and run maven managed project in mscode

$
0
0

Hi 

I git cloned alg4 project opened in an mscode instance, which ran other java files before. I have the maven plugin and it looks like it scanned the pom.xml file. I then tried to run one of the files called BinarySearch and could not. I tried compiling it from the command line with Javac command, I looked everywhere for the file with the same name and .class extension so I can do java BinarySearch but can not find any. I also know the file takes command line arguments. I did pass the right commands, and I know that because this is the source for a course that has a book. I am just trying run the same command on page 46 of the book which is available online and free as a reference. The entire command is BinarySearch tinyT.txt < tinyW.txt. I did add the two input text files also. I basically put in the same content that I see in the book. I do not know what I am missing. The book has an example in which they issue the following command: "BinarySearch tinyT.txt < tinyW.txt" and they have: 

How to bring content from MySql workbench to Visual Studio

$
0
0

I would like to know how to bring information from MySql workbench to visual Studio.

So i made a program that you need to insert your login and password. After that i made another form that shows user information.

On workbench i put users information.

My question is how do i bring user REAL name "Not logins name"  from workbench to display on visual studio label.

Viewing all 21115 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>