This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Bias Types:
⚠️ windows_first
⚠️ windows_tools
⚠️ missing_linux_example
Summary:
The documentation demonstrates a Windows bias by using Windows-style paths (backslashes), referencing Windows tools (File Explorer), and providing screenshots from Windows environments. There are no explicit Linux or macOS instructions, examples, or screenshots, and some steps (such as zipping files) assume familiarity with Windows tooling. The language and examples do not address cross-platform differences or provide parity for Linux users.
Recommendations:
  • Provide parallel instructions and screenshots for Linux/macOS environments, including terminal commands for file navigation and zipping files (e.g., using 'zip' command).
  • Use platform-agnostic path notation or clarify both Windows (\) and Linux/macOS (/) path formats in file navigation steps.
  • Include notes or sections that address common differences in running .NET projects and Azure CLI commands on Linux/macOS, such as prerequisites or shell differences.
  • Replace or supplement Windows-specific tool references (like File Explorer) with cross-platform alternatives (e.g., using the terminal or Finder on macOS).
  • Add explicit statements confirming that all steps are supported on Linux/macOS, and provide troubleshooting tips for non-Windows users where applicable.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-08-17 00:01 #83 in_progress ✅ Clean
2025-07-13 21:37 #48 completed ✅ Clean
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

You can now stop running the project. Keep the console window open at this location, though, as you use this app again later in the tutorial. ## Set up the sample function app The next step is setting up an [Azure Functions app](../azure-functions/functions-overview.md) that will be used throughout this tutorial to process data. The function app, SampleFunctionsApp, contains two functions: * *ProcessHubToDTEvents*: processes incoming IoT Hub data and updates Azure Digital Twins accordingly * *ProcessDTRoutedData*: processes data from digital twins, and updates the parent twins in Azure Digital Twins accordingly In this section, you publish the prewritten function app, and ensure the function app can access Azure Digital Twins by assigning it a Microsoft Entra identity. The function app is part of the sample project you downloaded, located in the *digital-twins-samples-main\AdtSampleApp\SampleFunctionsApp* folder. ### Publish the app To publish the function app to Azure, you need to create a storage account, then create the function app in Azure, and finally publish the functions to the Azure function app. This section completes these actions using the Azure CLI. In each command, replace any placeholders in angle brackets with the details for your own resources. 1. Create an Azure storage account by running the following command:
Save the file. Now, to see the results of the data simulation that you set up, open a new local console window and navigate to *digital-twins-samples-main\DeviceSimulator\DeviceSimulator*. >[!NOTE] > You should now have two open console windows: one that's open to the *DeviceSimulator\DeviceSimulator* folder, and one from earlier that's still open to the *AdtSampleApp\SampleClientApp* folder. Use the following dotnet command to run the device simulator project:
1. Next, you zip up the functions and publish them to your new Azure function app. 1. Open a console window on your machine (if you're using the local Azure CLI, it can be the same window) and navigate into the *digital-twins-samples-main\AdtSampleApp\SampleFunctionsApp* folder inside your downloaded sample project. 1. In the console, run the following command to publish the project locally:
This command publishes the project to the *digital-twins-samples-main\AdtSampleApp\SampleFunctionsApp\publish* directory. 1. Using your preferred method, create a zip of the published files that are located **inside** the *digital-twins-samples-main\AdtSampleApp\SampleFunctionsApp\publish* directory. Name the zipped folder *publish.zip*. >[!IMPORTANT] >Make sure the zipped folder doesn't include an extra layer for the *publish* folder itself. It should only contain the contents that were inside the *publish* folder. Here's an image of how the zip contents might look (it might change depending on your version of .NET). :::image type="content" source="media/tutorial-end-to-end/publish-zip.png" alt-text="Screenshot of File Explorer in Windows showing the contents of the publish zip folder."::: The last step is done in the Azure CLI. 1. In the Azure CLI, run the following command to deploy the published and zipped functions to your Azure function app:
Next, plug these values into the device simulator code in your local project to connect the simulator into this IoT hub and IoT hub device. Navigate on your local machine to the downloaded sample folder, and into the *digital-twins-samples-main\DeviceSimulator\DeviceSimulator* folder. Open the *AzureIoTHub.cs* file for editing. Change the following connection string values to the values you previously gathered: