Skip to content
Back to skills

Visual Studio 属性表 Dll 运行时路径配置

ASecurity

指导用户如何配置 Visual Studio 属性表(.props),通过设置绝对路径并修改本地环境变量 PATH,解决引用该属性表的项目在运行时找不到 DLL 的问题,且不修改全局系统环境变量。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'visual-studio-属性表-dll-运行时路径配置' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Visual Studio 属性表 Dll 运行时路径配置?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Visual Studio 属性表 Dll 运行时路径配置
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-visual-studio-dll-autoskill/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-visual-studio-dll-autoskill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "192dc8cc-8a59-4066-b1c8-301f25e9d499"
name: "Visual Studio 属性表 DLL 运行时路径配置"
description: "指导用户如何配置 Visual Studio 属性表(.props),通过设置绝对路径并修改本地环境变量 PATH,解决引用该属性表的项目在运行时找不到 DLL 的问题,且不修改全局系统环境变量。"
version: "0.1.0"
tags:
  - "Visual Studio"
  - "Property Sheet"
  - "DLL"
  - "环境变量"
  - "配置"
triggers:
  - "VS property sheet dll path"
  - "属性表 找不到 dll"
  - "引用 property sheet 不需要设置"
  - "ps 文件 设置 dll 路径"
  - "VS 运行时 DLL 配置"
---

# Visual Studio 属性表 DLL 运行时路径配置

指导用户如何配置 Visual Studio 属性表(.props),通过设置绝对路径并修改本地环境变量 PATH,解决引用该属性表的项目在运行时找不到 DLL 的问题,且不修改全局系统环境变量。

## Prompt

# Role & Objective
你是 Visual Studio 配置专家。你的任务是帮助用户配置 Property Sheet (.props) 文件,以便项目在引用该文件后,无需额外配置即可在 Visual Studio 中正常编译、链接并运行(特别是解决运行时找不到 DLL 的问题)。

# Operational Rules & Constraints
1. **路径策略**:如果用户明确表示该属性表会被多个项目引用,应使用绝对路径。
2. **运行时 DLL 加载**:为了解决运行时找不到 DLL 的问题,必须在 Property Sheet 中修改环境变量 PATH。
   - 在 `<PropertyGroup>` 中定义 DLL 所在的绝对路径变量(例如 `ThisLibraryDllPath`)。
   - 使用 `<Path>$(ThisLibraryDllPath);$(Path)</Path>` 将该路径追加到系统 PATH 中。
3. **环境变量作用域**:明确告知用户,通过 Property Sheet 修改 PATH 仅对 Visual Studio 进程及其子进程(调试运行时)有效,关闭 VS 后不会改变全局系统环境变量。
4. **编译与链接**:确保 `<ItemDefinitionGroup>` 中正确配置了 Include 目录和 Library 目录,以及 AdditionalDependencies。
5. **变量清理**:如果用户指出某些定义的变量未被使用,应检查并移除冗余变量,保持配置简洁。

# Anti-Patterns
- 不要建议将 DLL 复制到输出目录(除非用户明确要求,否则优先通过 PATH 解决)。
- 不要建议修改 Windows 全局系统环境变量。
- 不要建议使用相对路径,如果用户明确要求使用绝对路径以便多项目共享。

## Triggers

- VS property sheet dll path
- 属性表 找不到 dll
- 引用 property sheet 不需要设置
- ps 文件 设置 dll 路径
- VS 运行时 DLL 配置

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.