Skip to content

Commit 1c1160f

Browse files
authored
Merge pull request #1993 from asb3993/amburns-contentvalidationfixes
Content validation fixes
2 parents 171d17c + 5e1dfc7 commit 1c1160f

14 files changed

+50
-47
lines changed

mac/asp-net-core.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ To add a controller, do the following:
139139

140140
2. Add the following code to the new controller:
141141

142-
```
142+
```csharp
143143
using System;
144144
using Microsoft.AspNetCore.Mvc;
145145
using System.Text.Encodings.Web;
@@ -228,6 +228,6 @@ Make sure to complete all four steps successfully to ensure that .NET Core is in
228228

229229
This guide gave an introduction to ASP.NET Core. It describes what it is, when to use it, and provided information on using it in Visual Studio for Mac.
230230
For more information on the next steps from here, refer to the following guides:
231-
- [ASP.NET Core](https://docs.microsoft.com/aspnet/core/#build-web-ui-and-web-apis-using-aspnet-core-mvc) docs.
231+
- [ASP.NET Core](https://docs.microsoft.com/aspnet/core/?view=aspnetcore-2.1#build-web-ui-and-web-apis-using-aspnet-core-mvc) docs.
232232
- [Creating Backend Services for Native Mobile Applications](https://docs.microsoft.com/aspnet/core/mobile/native-mobile-backend), which shows how to build a REST service using ASP.NET Core for a Xamarin.Forms app.
233233
- [ASP.NET Core hands-on lab](https://github.com/Microsoft/vs4mac-labs/tree/master/Web/Getting-Started).

mac/configurations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Understanding Build Configurations in Visual Studio for Mac"
2+
title: "Understanding Build Configurations"
33
description: "This article describes the various build configurations in Visual Studio for Mac"
44
author: asb3993
55
ms.author: amburns

mac/connected-services.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Connected Services"
33
description: "Add Azure data storage, authentication, and push notifications to mobile apps from within Visual Studio for Mac"
4-
ms.prod: xamarin
54
ms.assetid: 41CB62FF-0F39-4CE8-8917-6A77F058719F
65
author: asb3993
76
ms.author: amburns

mac/create-new-projects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Creating new Projects and Solutions Visual Studio for Mac"
2+
title: "Creating new Projects and Solutions"
33
description: "This article describes how to create projects and solutions in Visual Studio for Mac"
44
author: asb3993
55
ms.author: amburns
@@ -28,7 +28,7 @@ This method of adding new projects can be used to take advantage of Xamarin code
2828

2929
The landing page of Visual Studio displays a list of recent projects that you have been working on:
3030

31-
![](media/create-new-projects-recent.png)
31+
![Recent solutions section on welcome page](media/create-new-projects-recent.png)
3232

3333
You can filter this list using the Filter box or remove individual items from the list.
3434

mac/customizing-build-system.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ MSBuild uses an XML file, called a project file, that defines the *Items* that a
2424

2525
Locate the MSBuild file by right-clicking on your project name and selecting **Reveal in Finder**. The finder window displays all the files and folders related to your project, including the `.csproj` file, as illustrated in the following image:
2626

27-
![](media/customizing-build-system-image1.png)
27+
![csproj location in Finder](media/customizing-build-system-image1.png)
2828

2929
To display the `.csproj` in a new tab in Visual Studio for Mac, right-click on your project name and browse to **Tools > Edit File**:
3030

31-
![](media/customizing-build-system-image2.png)
31+
![opening the csproj in the source editor](media/customizing-build-system-image2.png)
3232

3333
### Composition of the MSBuild file
3434

3535
All MSBuild files contain a mandatory root `Project` element, like so:
3636

37-
```
37+
```xml
3838
<?xml version="1.0" encoding="utf-8"?>
3939
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4040
</Project>
4141
```
4242

4343
Typically, the project will also import a `.targets` file. This file contains many of the rules that describe how to process and build the various files. The import usually appear towards the bottom of your `proj` file, and for C# projects look something like this:
4444

45-
```
45+
```xml
4646
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
4747
```
4848

@@ -60,7 +60,7 @@ They are set using a PropertyGroup and can contain any number of PropertiesGroup
6060

6161
For example, the PropertyGroup for a simple console application might look like the following XML:
6262

63-
```
63+
```xml
6464
<PropertyGroup>
6565
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6666
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -82,7 +82,7 @@ Items are created by declaring an `ItemGroup`. There can be any number of ItemGr
8282

8383
For example, the following code snippet creates the iOS Launch Screens. The Launch Screens have the build type `BundleResource`, with the spec as the path to the image:
8484

85-
```
85+
```xml
8686
<ItemGroup>
8787
<BundleResource Include="Resources\Default-568h%402x.png" />
8888
<BundleResource Include="Resources\Default%402x.png" />
@@ -92,7 +92,7 @@ For example, the following code snippet creates the iOS Launch Screens. The Laun
9292
<BundleResource Include="Resources\Default-Landscape%402x.png" />
9393
</ItemGroup>
9494
```
95-
95+
9696
Item sets can be referred to from expressions using the `@()` syntax. For example, `@(BundleResource)` will be evaluated as the BundleResource item set, which means all of the BundleResource items. If there are no items of this type, it will be empty, without any error.
9797

9898
## Resources for learning MSBuild
@@ -101,5 +101,3 @@ The following resources can be used to learn about MSBuild in more detail:
101101

102102
* [MSDN - Overview](https://msdn.microsoft.com/library/dd393574.aspx)
103103
* [MSDN - Concepts](https://msdn.microsoft.com/library/dd637714.aspx)
104-
105-

mac/editorconfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ If you're working with a project or solution that already contains an `.editorco
6969
7070
You may want to reuse an existing `.editorconfig` file in your project. To add an existing file, you first need to display hidden files in Finder by entering the following command in **Terminal**:
7171
72-
```
72+
```bash
7373
$ defaults write com.apple.Finder AppleShowAllFiles true
7474
$ killall Finder
7575
```

mac/nuget-walkthrough.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Walkthrough - Including a NuGet package in your project"
2+
title: "Including a NuGet package in your project"
33
description: This document covers how to include a NuGet package in a Xamarin project. It walks through finding and downloading a package, as well as introducing the IDE integration features.
44
author: asb3993
55
ms.author: amburns
@@ -23,8 +23,6 @@ First, create a project named `HelloNuget` as illustrated below. This example sh
2323

2424
![Create new iOS Project](media/nuget-walkthrough-NewProject.png)
2525

26-
<a name="Adding_a_Package" class="injected"></a>
27-
2826
## Adding a Package
2927

3028
With the project open in Visual Studio for Mac, right-click on the **Packages** folder in the **Solution Pad** and select **Add Packages...**:
@@ -46,18 +44,19 @@ Use the search box in the top-right corner to find a specific package, for examp
4644

4745
Once the package has been downloaded it will be added to your project. The solution will change as follows:
4846

49-
* The **References** node will contain a list of all the assemblies that are part of a NuGet package.
50-
* The **Packages** node displays each NuGet package that you have downloaded. You can update or remove a package from this list.
51-
* A **packages.config** file will be added to the project. This XML file is used by the IDE to track which package versions are referenced in this project. This file should not be hand-edited, but you should keep it in version control. Note that a project.json file can be used instead of a packages.config file. The project.json file is a new package file format introduced with NuGet 3, which supports transitive restore. More detailed information on project.json can be found in the [NuGet documentation](http://docs.microsoft.com/NuGet/Schema/Project-Json). The project.json file needs to be added manually and the project closed and re-opened before the project.json file is used in Visual Studio for Mac.
47+
* The **References** node will contain a list of all the assemblies that are part of a NuGet package.
48+
* The **Packages** node displays each NuGet package that you have downloaded. You can update or remove a package from this list.
49+
* A **packages.config** file will be added to the project. This XML file is used by the IDE to track which package versions are referenced in this project. This file should not be hand-edited, but you should keep it in version control. Note that a project.json file can be used instead of a packages.config file. The project.json file is a new package file format introduced with NuGet 3, which supports transitive restore. More detailed information on project.json can be found in the [NuGet documentation](http://docs.microsoft.com/NuGet/Schema/Project-Json). The project.json file needs to be added manually and the project closed and re-opened before the project.json file is used in Visual Studio for Mac.
5250

5351
## Using NuGet Packages
5452

5553
Once the NuGet package has been added and the project references updated you can program against the APIs as you would with any project reference.
5654

5755
Ensure that you add any required `using` directives to the top of your file:
5856

59-
60-
using Newtownsoft.json;
57+
```csharp
58+
using Newtownsoft.json;
59+
```
6160

6261
Most NuGet provide additional information, such as a README or Project page link to the Nuget source. You can normally find a link to this in the package blurb on the Add Packages page:
6362

mac/projects-and-solutions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: "Projects and Solutions"
33
description: This document provides an overview of Projects and Solutions in Visual Studio for Mac.
44
author: asb3993
5-
ms.author: amburns05/06/201804/14/2017
5+
ms.author: amburns
6+
ms.date: 05/06/2018
67
ms.assetid: 8254505D-D96E-48BD-8A5E-CF6A917897EA
78
---
89
# Projects and Solutions

mac/set-up-subversion-repository.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Setting Up a Subversion Repository
3-
description: Using Git and Subversion in Visual Studio for Mac.
3+
description: Using Subversion in Visual Studio for Mac.
44
author: asb3993
55
ms.author: amburns
66
ms.date: 05/06/2018
@@ -9,33 +9,45 @@ ms.assetid: 0D58FB37-530E-495B-BED6-FD499477A9B6
99

1010
# Setting up a Subversion repository
1111

12-
Subversion is a centralized version control system. This means that there is a single server that contains all files and revisions from which users can check out any version of any file. When files are checked out from a remote Subversion repository, the user will get a snapshot of the repository at that point in time.
12+
Subversion is a centralized _version control system_, meaning that there's a single server that contains all files and revisions, from which users can check out any version of any file. When files are checked out from a remote Subversion repository, the user gets a snapshot of the repository at that point in time.
1313

14-
Before starting to use Subversion, the Xcode command line tools must be installed as they include the correct svn packages. You can check that SVN is installed in Terminal with the following command:
14+
To use Subversion for your version control, it must be installed on your machine. To check if Subversion is installed your machine, use the following command in Terminal:
1515

16-
`svn h`
16+
```bash
17+
svn --version
18+
```
19+
20+
This command returns the version number.
21+
22+
If Subversion isn't already installed, the easiest way to get it is by installing the _Xcode Command Line Tools_. Use the command below to install Xcode Command Line Tools and Subversion.
23+
24+
```bash
25+
xcode-select --install
26+
```
27+
28+
Once Subversion is installed on your machine, use the following steps to publish your project in SVN.
1729

1830
1. Create a free SVN repository online. For this example, [Assembla](https://app.assembla.com/) was used. Once created, a URL will be provided, which will be used to connect to the repository:
1931

20-
![Obtain SVN URL and copy it](media/version-control-subversion1-sml.png)
32+
![copy the SVN URL](media/version-control-subversion1-sml.png)
2133

2234
2. Open or create a Visual Studio for Mac Project.
2335

2436
3. Right click on the Project and select **Version Control > Publish in Version Control...**:
2537

2638
![Start Publishing Project](media/version-control-subversion2.png)
2739

28-
4. In the **Connect to Repository** tab, select **Subversion** from the top drop down.
40+
4. In the **Connect to Repository** tab, select **Subversion** from the top drop-down.
2941

30-
5. Enter the URL from step 1. This should populate the other fields by default:
42+
5. Enter the URL from step 1. Once the URL is entered, the other fields are populated by default:
3143

3244
![Select Repository and Enter details Dialog](media/version-control-subversion3.png)
3345

3446
7. Click **OK** and then confirm by pressing **Publish**.
3547

36-
7. You might be prompted to enter your credentials for the site on which you create the repository. Enter these as illustrated below:
48+
7. If prompted, enter your credentials for the site on which you create the repository, as illustrated below:
3749

38-
![](media/version-control-subversion5.png)
50+
![Entering credentials for subversion repo](media/version-control-subversion5.png)
3951

4052
8. All the version control commands available should now be visible in the version control menu.
4153

mac/signing-in.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ To sign in to Visual Studio for Mac, do the following steps:
3636

3737
Visual Studio for Mac supports adding multiple accounts to your personalization account. These additional accounts will allow you to access resources, such as Azure, from any added account.
3838

39-
To add additional user accounts, follow the steps in the [How to sign in to Visual Studio for Mac](#How_to_sign_in_to_Visual_Studio_for_Mac) section.
39+
To add additional user accounts, follow the steps in the [How to sign in to Visual Studio for Mac](#how-to-sign-in-to-visual-studio-for-mac) section.
4040

mac/source-editor.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Viewing and moving efficiently throughout code is an integral part of the develo
2121

2222
Visual Studio for Mac offers many powerful features to make cross-platform development as accessible and as useful as possible. The following sections describe some of the highlights.
2323

24-
2524
## Code folding
2625

2726
Code folding makes it easier to manage large source code files by allowing developers to show or hide complete sections of code, such as using directives, boilerplate code and comments, and #region statements. Code folding is turned off by default in Visual Studio for Mac
@@ -58,25 +57,20 @@ The option to show tabs, spaces, and line endings is also available:
5857

5958
![whitespace displayed](media/source-editor-image22.png)
6059

61-
6260
## Ruler
6361

6462
The column ruler is useful for determining line lengths, particularly when working on a team that has line length guidelines. The column ruler can be turned on or off by navigating to **Visual Studio > Preferences... > Text Editor > Markers and Rulers** and selecting (or deselecting) **Show Column ruler**, as illustrated in the following image:
6563

66-
![](media/source-editor-image5.png)
64+
![Preferences dialog with "show column ruler" highlighted](media/source-editor-image5.png)
6765

6866
This displays as a vertical light gray line in the source editor.
6967

70-
7168
## Highlight identifier references
7269

7370
With the "Highlight identifier references" option is enabled, you can select any symbol in the source code and the source editor will provide a visual guide to all other references in that file. To turn on this option, go to **Visual Studio > Preferences... > Text Editor > Markers and Rulers** and select _Highlight identifier references_, as illustrated in the following image:
7471

75-
![](media/source-editor-image6.png)
72+
![Preferences dialog with "Highlight identifier references" highlighted](media/source-editor-image6.png)
7673

7774
The color of the highlight is also useful for denoting that something is being assigned or referenced. If something is assigned, it is highlighted in red; if it is referenced, it is highlighted in blue:
7875

79-
![](media/source-editor-image7.png)
80-
81-
82-
76+
![example showing color of higlight](media/source-editor-image7.png)

mac/task-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When writing code, it is standard practice to explicitly comment unfinished or q
1515

1616
To add a new task comment, add a comment that includes the task keyword. For example:
1717

18-
```
18+
```csharp
1919
//TODO: Finish this for all properties.
2020
```
2121

mac/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ When an exception has been caught, an exception bubble will appear. To view more
2323

2424
This will display the **Show Details** dialog, providing more information regarding the exception:
2525

26-
![](media/troubleshooting-image3.png)
26+
![Show details dialog](media/troubleshooting-image3.png)
2727

2828
Important sections of the dialog, which are numbered above are described in detail below:
2929

mac/version-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Subversion is a centralized version control system, which means that there is a
1919

2020
Git is a distributed version control system that allows teams to work on the same documents simultaneously. With Git there might be a single server that contains all the files, but the entire repository is cloned locally to your machine whenever a repository is checked out from this central source.
2121

22-
# Basic Concepts
22+
## Basic Concepts
2323

2424
Visual Studio for Mac provides support for both Git and Subversion version control systems. The following articles explore setting up Git and Subversion repositories through Visual Studio for Mac, as well as simple functionality such as reviewing, committing, and pushing changes.
2525

0 commit comments

Comments
 (0)