部署.NET Compact Framework应用程序的所有文件的Visual Studio问题 [英] Visual Studio problem with deploying all files of .NET Compact Framework application

查看:193
本文介绍了部署.NET Compact Framework应用程序的所有文件的Visual Studio问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序包含一个可执行项目和一个dll库。我的可执行项目已经添加了对库项目的引用。

My application consist of an executable project and a dll library. My executable project has added the reference to the library project.

库项目包含一些内容文件,如.ini .bmp。问题是当我部署可执行项目时,这些文件不会被复制到设备。只复制dll文件。好奇的是,所有文件都复制到台式机上的\ExecutableProject\bin\Debug目录。

The library project contains some "content" files like .ini .bmp. The problem is that these files are not copied to the device when I deploy the executable project. Only dll file is copied. The curious thing is that all files are copied to the \ExecutableProject\bin\Debug directory on the desktop machine.

为了解决这个问题,我设置了部署dll项目的路径与可执行项目相同,我正在部署它们,但是这个解决方案似乎不太好。

To workaround this I've set the deployment path of dll project the same as executable project and I'm deploying them both, but this solution doesn't seem to be nice.

我正在使用VS2008和我的设备在Windows CE上工作。

I'm using VS2008 and my device works on Windows CE.

推荐答案

有几件事要检查。


  • 仔细检查Build Action是否设置为Content

  • 确保复制到输出文件夹设置为始终复制或复制更新

  • 确保库项目的部署文件夹是您期望的(属性 - >设备 - >输出文件夹)

  • 确保库项目设置为与可执行文件相同的目标设备

  • 确保库项目为设置为部署您的配置(Build->配置管理器)

  • 请记住,如果内容文件位于项目中的子文件夹中,则它们将最终存储在设备上的子文件夹中

  • Double check that the "Build Action" is set to "Content"
  • Make sure that the "Copy to Output folder" is set to "Copy Always" or "Copy If Newer"
  • Make sure that the deployment folder for the library project is what you expect (Properties->Devices->Output File Folder)
  • Make sure that the library project is set to the same target device as the executable
  • Make sure the library project is set to deploy for your configuration (Build->Configuration Manager)
  • Remember that if the content files are in a subfolder in the project, they will end up in a subfolder on the device

这篇关于部署.NET Compact Framework应用程序的所有文件的Visual Studio问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆