Как предлагалось ранее, используйте API истории . Чтобы получить значения для Мюнхена на сегодня + следующие 4 дня, используйте что-то вроде:
const getStartAndEndDateTimestamps = increment => {
let startDate = new Date();
startDate.setDate(startDate.getDate() + increment);
startDate.setHours(0,0,0,0);
let endDate = new Date();
endDate.setDate(endDate.getDate() + increment);
endDate.setHours(23,59,59,999);
return {
start: startDate.valueOf(),
end: endDate.valueOf()
};
};
const city = 'München';
[0, 1, 2, 3, 4].forEach(increment => {
const timestamps = getStartAndEndDateTimestamps(increment);
const requestUrl = `http://history.openweathermap.org/data/2.5/history/city?q=${encodeURIComponent(city)}&type=hour&start=${timestamps.start}&end=${timestamps.end}`;
// get & process API data
});
OK I have found the issue. Nothing related to MSBuild, but instead the solution being built. Posting to save someone else the heartache.
For whatever reason the Debug configuration was configured within the solution like so:
alt text http://www.freeimagehosting.net/uploads/cad0bdf1c0.jpg
So MSBuild was only doing what it was told too...
Вы попытались работать с/v:diag?
Кроме того, в стороне: Я думаю, что Вы хотите "AnyCPU" (никакое пространство).
Я получал такую же ошибку. Решением было явное указание целевой платформы с помощью:
msbuild.exe /p:Platform="Any CPU"
Это стало происходить только после того, как я обновился до windows 7, так что я думаю, что это как-то связано с этим.