Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Microsoft Visual Studio

387

Solutions

452

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi

I am trying to find an example of building a web project in Visual Studio that manipulates the REST/SOAP API
as per https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm

I am an ASP.net developer and was hoping to use an ASP.net web app
0
Get your Conversational Ransomware Defense e‑book
LVL 1
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

I want to create a SharePoint add-in that has a document library with meta-data similar to the Sharepoint OOB customization done here.

However, when I create a Content Type in Visual Studio (Add -> New Item -> Office/SharePoint -> Content Type), the content type columns are pick from a list, instead of configure your own. I could configure how I want in the .xml, but this seems awkward. Am I taking the right approach here?

Content Configuration Box
Content Configuration XML
0
My old computer was crashed but I have all files save in my usb. I have another computer Dell Latitude D620  with same windows 7. I copied all of my vs 2010 projects and run all of my saved sql scripts back into sql server 2008. But when I try to load projects in visual studio 2010, I am keep getting error.
screenshot.pngscreenshot2.pngscreenshot4.pngscreenshot5.pngscreenshot3.png
0
I use Chrome and wonder what I need to install into Visual Studio Code in order to debug inside of Visual Studio Code.

I do not want to use the Chrome debugger, since I waste so much time  searching for the file to debug. I wand to set breakpoints in Visual Studio Code.

Thanks.
0
Hi,

I am compiling a .Net application using Visual Studio 2010 which has 2 C# projects, one VB.Net project and one Deployment project.
It compiled successfully on my development machine on Release/x-86 mode. Compiled successfully (when i compile it manually) on our build server on Release/x-86 mode.
But on same build server when TFS auto build tries to compile it then it is throwing following error:
vbc: compiler initialization failed unexpectedly: Project already has a reference to assembly stdole. A second reference to 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Common\stdole.dll' cannot be added.
0
I have a TableLayoutPanel on my form. However, when I Debug or run the Release the table doesn't appear. Just the contents inside the table.

How do I make the actual table grid lines show up on the form when it's running?
0
I'm extremely new to programming. I've been tinkering with it on and off for decades but have never written an actual program. That changed yesterday.

Now, I've hit a brick wall.

I do not understand the fundamentals, but I get how code works for the most part.

My question is I have code that looks like this:

Private Sub Crystl32Button_Click(ByVal sender As System.Object, e As EventArgs) Handles Crystl32Button.Click
        For Each P As Process In System.Diagnostics.Process.GetProcessesByName("InHouseApp")
            P.Kill()
            P.WaitForExit()
        Next
        My.Computer.FileSystem.CopyFile("\\remoteserver\software\iha\ocx\crystl32\*.*", "C:\Windows\System32\",
        Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
    End Sub

Open in new window


I want to add the functionality of this:

Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Remove the FileSystemAccessRule from the security settings. 
        fSecurity.RemoveAccessRule(New FileSystemAccessRule(account, _
            rights, controlType))

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub

Open in new window


This code is supposed to remove the ACL listing of a specific account for a file.

However, I do not know how to add this:

Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

Open in new window


To my button click sub. Whenever I try, it auto-completes and removes the "Sub" I type in. I assume you can't have a Sub within a Sub but what do I modify in order to get the rest of the ACL code to work with the button click? Do I have to modify the button click Sub in order to match the ACL one?

I apologize if I'm not making sense. Again, this is my first real program and I'm not exactly up to par on all the methodologies.
0
Hi All,

Is there any enhancement datagridview and datagridview using virtual mode from VS 2008 to 2013, 2015 and 2017 ?

Thank you.
0
I need to refresh my use of writing unit tests with Visual Studio and hope to download some simple program with a handful of working unit tests I can inspect.

Thanks
0
I have not done unit testing for a little while and expect a test upcoming to verify I can quickly write unit tests.

Suggestions of the thing I should be practicing?

Unit tests generate their own mock data, but I doubt a test would include me setting up a mocking framework. I think hard coded lists of objects would be the ideal method, on a coding test.

I assume the object wold be written already for me (it's going to be a 15 minutes test only)

I would create an instance of the object, review the parameter list for that method being tested...

I could create multiple sets of test data. Would a switch statement be appropriate for this kind of knock em out unit test? I could iterate through and handle a handful of test conditions...


Assertions are key.

Once it fails, the unit test fails. I need to be sure the specific test condition which failed the assertion is visible in the console.

Am I approaching this test the right way?

Suggestions?

Thanks.
0
Visualize your virtual and backup environments
LVL 1
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

I use Visual Studio Code on Windows to code Angular, with a Node server running and Chrome as the browser.

Is there a way to set breakpoints?

I assume Chrome breakpoints work the same as with Javascript, with no issue.

I also know that Visual Studio debugs Javascript (with breakpoints) for the old Internet Explorer.

What are my options for setting breakpoints easily with Angular? I do not find Chrome easy since I need to find the file, find the line number, etc. I much prefer using Visual Studio since it's more like a WYSIWYG type of setting breakpoints.

Suggestions?

Is there a modern browser which works with Visual Studio the way VS once suppoted Internet Explorer?

Thanks
0
Mobile App is free??? in Visual Studio 2017 Community
Almost 30 GB in size!FREE?What will happen to my existing VB installed?
Thank you.
0
I am developing windows forms application  with C# on Visual studio 2017 with an aim to upgrade my applications developed on old visual basic 6.  I am retrieving data from mysql database to populate rich text box.  Backend database table of the relevant field contains  rich text formatting characters saved from rich text box of visual basic 6 of windows.  That time, I used rich text box to hold images as well.
As usual, I am using the following code to populate the rich text box with C# on Visual studio 2017

 MySqlCommand cmd1 = new MySqlCommand(sql1, conn1);
 MySqlDataReader dr1 = cmd1.ExecuteReader();

Code………
If (dr.Read())
{
     rtbEventInfo.Text = dr1["eventinfo"].ToString();
 }

The rich text box is displaying  System.Byte[] instead of rich text formatted information

Any thoughts
0
How do you setup a wait wheel animation while a file is loading in Visual Studio?

Thanks,

Dan
0
I have a form that opens maximized, but the form is off to the left side with all the gray space to the right.  Is there a way I can center the form within the window?  I'm not talking about centering it on the desktop, I just want it centered within it's own window.
0
I'm new to C# development and using Visual Studio 2017.  I'm getting an error  when I try to add a "using" statement at the top of my C# class.  I have this code below which gives me this error: The type or namespace 'Custom_Folder' does note exist in the namespace 'CustomerProject'

using CustomerProject.Custom_Folder;

Open in new window


If I type the below, it works fine:

 using CustomerProject.Models;

Open in new window



It's an ASP.Net MVC project and the Models folder is auto generated, but either way, if I create a folder from within VS, I should be able to reference classes in that folder correct?

I manually created this folder from within Visual Studio, but it acts like the namespace does not exist.
0
I have a form that is long and runs off the screen.  I set AutoScroll to True on the form and also set AutoScaleMode to dpi.  Even with these settings, the form goes under the taskbar and off the screen (no scroll bar is added).  The only workaround I have found is to set the height much smaller than what the form is and then the scroll bar is there.  The only problem with this workaround is that I have to set the height small so it will work on laptops with small resolutions.

Is there another option that I'm missing?  Another property of the form I need to set?
0
I've just bought a new Win10 pro PC, downloaded VS2017 Community and when i run it in Safe Mode (VS that is) + as Administrator (for good measure) , it still keeps falling down.

Does anyone have any other steps I can take. I can't see to see any crash reports
0
 Private Sub timSAVE_Tick(sender As Object, e As EventArgs) Handles timSAVE.Tick
lblTIMEDATE.Text = DateTime.Now.ToString("yyyy/MM/dd") - 1 day???????
End Sub

Open in new window

I need to display the previous day(s)
is this possible? Thanks.
0
What is SQL Server and how does it work?
LVL 1
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Hi, How to display this from databse to textbox?

SELECT COUNT(pcbid) FROM tblpcbtrace;

This is how I use when populating the datagrid
Dim cmd As New MySqlCommand
        Dim myDA As New MySqlDataAdapter(cmd)
        Dim myDT As New DataTable
        cmd.Connection = conn2
        cmd.CommandText = "SELECT * FROM eliteprototype.view_table_size;"

        myDA.Fill(myDT)
        DataGridView2.DataSource = myDT
        conn2.Close()

Open in new window


but how about in textbox?
0
I have a multiline textbox that could word wrap (user could type in a paragraph of text).  The problem is, when a line of text word wraps, I have no idea when that happens.  And because of this, when I output the line, it may run off the screen.  I have a string array that I am adding my output to, then when all lines are added, I will loop thru the array outputting the lines.

What I would like to do for the multiline texbox  is check if the string is more than 155 characters.  If the string is over 155 characters, I would break it at the first space that exists prior to the 156th character and add the text before that space to the array.  The remaining text would need to be tested to see if it's longer 155 characters.  If it is, it would need to be broken up the same way, if not, the remaining characters would be added to the next element in the array.

The code would look something like this...
dim strAnswer1 as string = texbox1.text
if strAnswer1.length > 155 Then
   add first part of string to strArray(i)
   handle remaining text in strAnswer1
else
   strArray(i) = strAnswer1
end if

Open in new window

I think there would need to be a loop where I would increment the "i" variable, which is the count, but I'm unclear how I should do this.  Basically what I need to do is breakup a string that might be longer than 155 characters (could be 500+ characters) into lengths less than 156 characters and add them to a string array, but I need the break to be at a point where there is a space.  Thanks!
0
I am developing a program in Visual Studio C#. At certain points, I have gotten it to compile, and I run it, and then it may crash. Then, when I try to recompile after attempting to fix the bug, it won't let me compile because the program is still in the queue of running programs. So, I am forced to reboot to get it killed out of the queue. I discovered that the way to kill it is with Windbg.exe by Microsoft, but I don't quite understand the procedure for killing the program. Can someone here please give me a set of instructions for killing the process that is succinct? (like "step 1" - "step 2", etc...).
0
I have updated vs 2017 community to version 15.3.5.  I have downloaded the newest ssdt package.  There are no project templates for sql analysis project.  Anyone know what I'm missing??
0
Good morning
Im passing a dropdownlistfor to my controller but for some reason is not mapping correctly, other parameter are not having issues only the dropdownlist. when I used chrome to see what values are passed I see the dropdown is passing the parameter as model.parameter see image bellow.  
 
 error.png
the problem is that when I look at visual studio in debugging I can see the parameters is not mapping correctly because it shows as 0, see image.

error1.png
this is the dropdown in my view

  <div class="form-group col-md-4">
            @Html.LabelFor(model => model.Usuario.Municipio)
            @(Html.DropDownListFor(m => m.Usuario.MunicipioId, new SelectList(Model.Municipios,"Id","Nombre"),"Seleccione municipio") )
        </div>

Open in new window


my view model looks like this

 public class NuevoUsuarioViewModel
    {
        [Display(Name = "Municipio")]
        public IEnumerable<BiciPublica.Models.Municipio> Municipios { get; set; }
        public Usuario Usuario { get; set; }
    }

Open in new window


and my httppost in my controller looks like this

  [HttpPost]
       public ActionResult Crear(BiciPublica.Models.Usuario model1)     
        {          
            _context.Usuarios.Add(model1);
            _context.SaveChanges();
            return View("Index");
        }

Open in new window


as you can see in the first image all other parameters are passing correctly.

I appreciate your help.
0
I am a newbie to SSAS and I am having difficulty setting up the Data Source, I am unable to successfully create a connection to my database for the data source.  What am I missing?

See attached for location of data files.  

How do I determine where my localhost is located?  Note this is all on my local machine, no outside servers involved.

What is my server name, do I need to include the entire filepath?

I am using Visual Studio Data Tools for 2015.


Setup_AWDW.JPGFilepathAWDW.JPGErrorMsg_SSAS.png
0

Microsoft Visual Studio

387

Solutions

452

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.